summaryrefslogtreecommitdiff
path: root/src/user/raleigh/w/button.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
commit5fcf57739e68a8b5053e03778aaee0eed445babd (patch)
treee7a8bab18668d112e58b1b48190195035c71fa8a /src/user/raleigh/w/button.cpp
parent0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff)
downloadportland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/raleigh/w/button.cpp')
-rw-r--r--src/user/raleigh/w/button.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/user/raleigh/w/button.cpp b/src/user/raleigh/w/button.cpp
index 5b5f756..b035ee2 100644
--- a/src/user/raleigh/w/button.cpp
+++ b/src/user/raleigh/w/button.cpp
@@ -1,9 +1,9 @@
#include <raleigh/w/button.h>
namespace raleigh {
- button::button(widget &inner, void (*on_click)(button &),
+ button::button(widget &inner, void (*on_click)(button_tag_t), button_tag_t tag,
_pixel_t border_color, _pixel_t bg_color, _pixel_t pressed_color)
- : inner(inner), on_click(on_click), border_color(border_color),
+ : inner(inner), on_click(on_click), tag(tag), border_color(border_color),
bg_color(bg_color), pressed_color(pressed_color), is_pressed(false) {
size = coord(inner.size.x + 2, inner.size.y + 2);
closest_opaque = this;
@@ -44,7 +44,7 @@ namespace raleigh {
inner.window_offset = coord(window_offset.x + 1, window_offset.y + 1);
inner.notify_window_change();
w->notify_needs_paint(*this);
- on_click(*this);
+ on_click(tag);
}
else {
is_pressed = true;