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>2010-10-05 14:38:14 +0000
committerStijn Buys <ingar@osirion.org>2010-10-05 14:38:14 +0000
commitfed29d9ddc3b8372b9c3fe8bffe221a5a55e5ce9 (patch)
tree659096f4412e6ad9a0f47e70a620da327195e67a /src/ui/iconbutton.cc
parent312b9bcb81748032ff21e3d3f1d5fd36405fb713 (diff)
updated inventory window, listview seletion sounds, modelview zoom factor
Diffstat (limited to 'src/ui/iconbutton.cc')
-rw-r--r--src/ui/iconbutton.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/iconbutton.cc b/src/ui/iconbutton.cc
index 204918e..5f16e71 100644
--- a/src/ui/iconbutton.cc
+++ b/src/ui/iconbutton.cc
@@ -81,7 +81,7 @@ void IconButton::draw()
Paint::set_color(palette()->foreground());
}
- Paint::draw_bitmap(location(), size(), icon());
+ Paint::draw_bitmap(global_location(), size(), icon());
}
void IconButton::draw_border()
@@ -101,9 +101,12 @@ void IconButton::draw_border()
bool IconButton::on_keypress(const int key, const unsigned int modifier)
{
if (key == 512 + SDL_BUTTON_LEFT) {
- if (enabled() && iconbutton_command.size()) {
- core::cmd() << iconbutton_command << std::endl;
+ if (enabled()) {
+ if (iconbutton_command.size()) {
+ core::cmd() << iconbutton_command << std::endl;
+ }
audio::play("ui/button");
+ emit(EventButtonClicked);
}
return true;
}