summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/button.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-14 01:07:23 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-14 01:07:23 +0300
commit035cc92ee2a435ff1d663e2037f543578dd2578a (patch)
tree084cc6998c99fd66100108428ea6bbb615af8ca7 /src/guichan/widgets/button.cpp
parent8bb2cb1e077ded2837be80cb4efa75391317de42 (diff)
downloadplus-035cc92ee2a435ff1d663e2037f543578dd2578a.tar.gz
plus-035cc92ee2a435ff1d663e2037f543578dd2578a.tar.bz2
plus-035cc92ee2a435ff1d663e2037f543578dd2578a.tar.xz
plus-035cc92ee2a435ff1d663e2037f543578dd2578a.zip
Block enter key from pressing active button.
Diffstat (limited to 'src/guichan/widgets/button.cpp')
-rw-r--r--src/guichan/widgets/button.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/guichan/widgets/button.cpp b/src/guichan/widgets/button.cpp
index 6ae443705..42dc686f0 100644
--- a/src/guichan/widgets/button.cpp
+++ b/src/guichan/widgets/button.cpp
@@ -241,32 +241,6 @@ namespace gcn
mouseEvent.consume();
}
- void Button::keyPressed(KeyEvent& keyEvent)
- {
- Key key = keyEvent.getKey();
-
- if (key.getValue() == Key::ENTER
- || key.getValue() == Key::SPACE)
- {
- mKeyPressed = true;
- keyEvent.consume();
- }
- }
-
- void Button::keyReleased(KeyEvent& keyEvent)
- {
- Key key = keyEvent.getKey();
-
- if ((key.getValue() == Key::ENTER
- || key.getValue() == Key::SPACE)
- && mKeyPressed)
- {
- mKeyPressed = false;
- distributeActionEvent();
- keyEvent.consume();
- }
- }
-
void Button::focusLost(const Event& event A_UNUSED)
{
mMousePressed = false;