Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/button.cc')
-rw-r--r--src/ui/button.cc17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/ui/button.cc b/src/ui/button.cc
index 6c34a4f..d356db9 100644
--- a/src/ui/button.cc
+++ b/src/ui/button.cc
@@ -93,15 +93,14 @@ void Button::draw()
// }
}
-bool Button::on_keypress(const int key, const unsigned int modifier)
+bool Button::on_mousepress(const unsigned int button)
{
- if (key == 512 + SDL_BUTTON_LEFT) {
+ if (button == SDL_BUTTON_LEFT) {
if (enabled()) {
if (button_command.size()) {
core::cmd() << button_command << std::endl;
}
audio::play("ui/clicked");
-
emit(EventButtonClicked);
}
return true;
@@ -110,16 +109,4 @@ bool Button::on_keypress(const int key, const unsigned int modifier)
return false;
}
-bool Button::on_keyrelease(const int key, const unsigned int modifier)
-{
- return false;
-}
-
-void Button::on_mouseover(const math::Vector2f &cursor)
-{
- if (enabled()) {
- //audio::play("ui/select");
- }
-}
-
}