diff options
author | Stijn Buys <ingar@osirion.org> | 2013-08-31 17:04:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-08-31 17:04:24 +0000 |
commit | 2ccf933af280efc249b47728b3b3fd6cf1beb90f (patch) | |
tree | d78d2ce5596e221b3c2246ccc58bb6d57b480fc6 /src/ui/iconbutton.cc | |
parent | cba3a6db5371f3454321c74cdee3ee002d5d4762 (diff) |
Use a different cursor for clickable ui elements.
Diffstat (limited to 'src/ui/iconbutton.cc')
-rw-r--r-- | src/ui/iconbutton.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/iconbutton.cc b/src/ui/iconbutton.cc index 22a7c14..066f5fa 100644 --- a/src/ui/iconbutton.cc +++ b/src/ui/iconbutton.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/iconbutton.h" @@ -83,6 +84,11 @@ void IconButton::draw() } Paint::draw_bitmap(global_location(), size(), color, icon()); + + if (enabled() && has_mouse_focus()) { + root()->set_pointer("action", Palette::Highlight); + } + } void IconButton::draw_border() @@ -95,7 +101,7 @@ void IconButton::draw_border() t = 1 - t; color.a = 0.5f + t; Paint::set_color(color); - Paint::draw_border(global_location(), size()); + Paint::draw_border(global_location(), size()); } } |