diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-21 22:22:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-21 22:22:47 +0300 |
commit | ba931a717cb5a2549ecdaa1f924dbbf5f896a21b (patch) | |
tree | 3c623bc1ce935c08b749572af439ae4b3b3dbc5b /src/gui/widgets/listbox.cpp | |
parent | 60b40c0c68e9cffbc5f48d4f672d99009488f8b1 (diff) | |
download | mv-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.gz mv-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.bz2 mv-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.xz mv-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.zip |
Rename keyEvent variables into event.
Diffstat (limited to 'src/gui/widgets/listbox.cpp')
-rw-r--r-- | src/gui/widgets/listbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 1df21af20..c41e32854 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -225,13 +225,13 @@ void ListBox::draw(Graphics *graphics) BLOCK_END("ListBox::draw") } -void ListBox::keyPressed(KeyEvent &keyEvent) +void ListBox::keyPressed(KeyEvent &event) { - const int action = keyEvent.getActionId(); + const int action = event.getActionId(); if (action == Input::KEY_GUI_SELECT) { distributeActionEvent(); - keyEvent.consume(); + event.consume(); } else if (action == Input::KEY_GUI_UP) { @@ -239,7 +239,7 @@ void ListBox::keyPressed(KeyEvent &keyEvent) setSelected(mSelected - 1); else if (mSelected == 0 && mWrappingEnabled && getListModel()) setSelected(getListModel()->getNumberOfElements() - 1); - keyEvent.consume(); + event.consume(); } else if (action == Input::KEY_GUI_DOWN) { @@ -248,17 +248,17 @@ void ListBox::keyPressed(KeyEvent &keyEvent) setSelected(mSelected + 1); else if (mSelected == num && mWrappingEnabled) setSelected(0); - keyEvent.consume(); + event.consume(); } else if (action == Input::KEY_GUI_HOME) { setSelected(0); - keyEvent.consume(); + event.consume(); } else if (action == Input::KEY_GUI_END && getListModel()) { setSelected(getListModel()->getNumberOfElements() - 1); - keyEvent.consume(); + event.consume(); } } |