From 920f1f010284d59bad86f78355ed90ac2f3e1d2c Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 8 Mar 2021 16:46:22 -0500 Subject: mouse movement in raleigh, with colorpicker dragging example --- src/user/raleigh/w/padding.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/user/raleigh/w/padding.cpp') diff --git a/src/user/raleigh/w/padding.cpp b/src/user/raleigh/w/padding.cpp index c1f7b85..782a8a9 100644 --- a/src/user/raleigh/w/padding.cpp +++ b/src/user/raleigh/w/padding.cpp @@ -34,4 +34,12 @@ namespace raleigh { void padding::notify_child_size_change(widget &child, coord old_size) { set_size(coord(inner.size.x + pad_by * 2, inner.size.y + pad_by * 2)); } + + void padding::on_mouse_move(coord window_coords) { + if ((window_coords.x >= inner.window_offset.x) && + (window_coords.y >= inner.window_offset.y) && + (window_coords.x < inner.window_offset.x + inner.size.x) && + (window_coords.y < inner.window_offset.y + inner.size.y)) + inner.on_mouse_move(window_coords); + } } \ No newline at end of file -- cgit v1.2.3