diff options
Diffstat (limited to 'src/user/raleigh/w/button.cpp')
-rw-r--r-- | src/user/raleigh/w/button.cpp | 6 |
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; |