summaryrefslogtreecommitdiff
path: root/src/user/raleigh/w/padding.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
commit920f1f010284d59bad86f78355ed90ac2f3e1d2c (patch)
tree19e2abcf6f546e251151582c700cfce312224eb1 /src/user/raleigh/w/padding.cpp
parentaf52ddac750311ace3bd997245771b26119e1659 (diff)
downloadportland-os-920f1f010284d59bad86f78355ed90ac2f3e1d2c.tar.gz
mouse movement in raleigh, with colorpicker dragging example
Diffstat (limited to 'src/user/raleigh/w/padding.cpp')
-rw-r--r--src/user/raleigh/w/padding.cpp8
1 files changed, 8 insertions, 0 deletions
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