diff options
author | Stijn Buys <ingar@osirion.org> | 2011-02-10 18:20:46 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-02-10 18:20:46 +0000 |
commit | a012d56b0f230114de0e9b10e15023faa3c8a44c (patch) | |
tree | 95b78f86a0f78f34ab47d442ac9a6617c3ec528c /src/ui | |
parent | 9ff5cf6184b9c5183c1f55cfa6c0d08586eb02c9 (diff) |
Sanitized ui sounds, removed button hover sound.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/button.cc | 4 | ||||
-rw-r--r-- | src/ui/iconbutton.cc | 7 | ||||
-rw-r--r-- | src/ui/listitem.cc | 7 | ||||
-rw-r--r-- | src/ui/ui.cc | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/ui/button.cc b/src/ui/button.cc index 6cbb51e..9e07c09 100644 --- a/src/ui/button.cc +++ b/src/ui/button.cc @@ -88,7 +88,7 @@ bool Button::on_keypress(const int key, const unsigned int modifier) if (button_command.size()) { core::cmd() << button_command << std::endl; } - audio::play("ui/button"); + audio::play("ui/clicked"); emit(EventButtonClicked); } @@ -106,7 +106,7 @@ bool Button::on_keyrelease(const int key, const unsigned int modifier) void Button::on_mouseover(const math::Vector2f &cursor) { if (enabled()) { - audio::play("ui/select"); + //audio::play("ui/select"); } } diff --git a/src/ui/iconbutton.cc b/src/ui/iconbutton.cc index 5f16e71..83c7aa7 100644 --- a/src/ui/iconbutton.cc +++ b/src/ui/iconbutton.cc @@ -105,7 +105,7 @@ bool IconButton::on_keypress(const int key, const unsigned int modifier) if (iconbutton_command.size()) { core::cmd() << iconbutton_command << std::endl; } - audio::play("ui/button"); + audio::play("ui/clicked"); emit(EventButtonClicked); } return true; @@ -121,8 +121,9 @@ bool IconButton::on_keyrelease(const int key, const unsigned int modifier) void IconButton::on_mouseover(const math::Vector2f &cursor) { - if (enabled()) - audio::play("ui/select"); + if (enabled()) { + //audio::play("ui/select"); + } } } diff --git a/src/ui/listitem.cc b/src/ui/listitem.cc index 8702757..8f445f1 100644 --- a/src/ui/listitem.cc +++ b/src/ui/listitem.cc @@ -53,14 +53,15 @@ void ListItem::draw() void ListItem::on_mouseover(const math::Vector2f &cursor) { - if (enabled()) - audio::play("ui/select"); + if (enabled()) { + //audio::play("ui/select"); + } } bool ListItem::on_keypress(const int key, const unsigned int modifier) { if (key == 512 + SDL_BUTTON_LEFT) { - audio::play("ui/button"); + //audio::play("ui/button"); emit(EventListItemClicked); diff --git a/src/ui/ui.cc b/src/ui/ui.cc index de881cb..a5ef883 100644 --- a/src/ui/ui.cc +++ b/src/ui/ui.cc @@ -530,7 +530,7 @@ bool UI::on_keypress(const int key, const unsigned int modifier) case SDLK_ESCAPE: if (active()) { hide_menu(); - audio::play("ui/menu"); + //audio::play("ui/menu"); } return true; break; |