From 2ccf933af280efc249b47728b3b3fd6cf1beb90f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 31 Aug 2013 17:04:24 +0000 Subject: Use a different cursor for clickable ui elements. --- src/ui/button.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui/button.cc') diff --git a/src/ui/button.cc b/src/ui/button.cc index cba7732..e9a40b9 100644 --- a/src/ui/button.cc +++ b/src/ui/button.cc @@ -11,6 +11,7 @@ #include "core/application.h" #include "core/commandbuffer.h" #include "sys/sys.h" +#include "ui/ui.h" #include "ui/paint.h" #include "ui/button.h" @@ -84,7 +85,12 @@ void Button::draw() } else { Paint::set_color(palette()->foreground()); } + Paint::draw_label(global_location(), size(), font(), text(), alignment()); + + if (enabled() && has_mouse_focus()) { + root()->set_pointer("action", Palette::Highlight); + } } bool Button::on_keypress(const int key, const unsigned int modifier) -- cgit v1.2.3