Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-08-31 17:04:24 +0000
committerStijn Buys <ingar@osirion.org>2013-08-31 17:04:24 +0000
commit2ccf933af280efc249b47728b3b3fd6cf1beb90f (patch)
treed78d2ce5596e221b3c2246ccc58bb6d57b480fc6 /src/ui/button.cc
parentcba3a6db5371f3454321c74cdee3ee002d5d4762 (diff)
Use a different cursor for clickable ui elements.
Diffstat (limited to 'src/ui/button.cc')
-rw-r--r--src/ui/button.cc6
1 files changed, 6 insertions, 0 deletions
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)