summaryrefslogtreecommitdiff
path: root/src/user/raleigh/w/button.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/button.cpp
parentaf52ddac750311ace3bd997245771b26119e1659 (diff)
downloadportland-os-920f1f010284d59bad86f78355ed90ac2f3e1d2c.tar.gz
mouse movement in raleigh, with colorpicker dragging example
Diffstat (limited to 'src/user/raleigh/w/button.cpp')
-rw-r--r--src/user/raleigh/w/button.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/user/raleigh/w/button.cpp b/src/user/raleigh/w/button.cpp
index 2abf9a9..224b930 100644
--- a/src/user/raleigh/w/button.cpp
+++ b/src/user/raleigh/w/button.cpp
@@ -55,4 +55,12 @@ namespace raleigh {
}
void button::notify_has_opaque_parent(widget *parent) {}
+
+ void button::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