From 436da6fcc0c02978306cf9d04c5e4986ebd9b80a Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Wed, 17 Feb 2010 15:24:14 +0000 Subject: [PATCH] J : * Very small addition to the key bindings menu. --- projects/mtg/src/TranslateKeys.cpp | 4 ++-- projects/mtg/src/WGui.cpp | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/TranslateKeys.cpp b/projects/mtg/src/TranslateKeys.cpp index 546806d2a..c28189dd6 100644 --- a/projects/mtg/src/TranslateKeys.cpp +++ b/projects/mtg/src/TranslateKeys.cpp @@ -68,8 +68,8 @@ const KeyRep& translateKey(JButton key) { slimtable[JGE_BTN_CANCEL] = new KeyRep(NULL, _("Cancel")); slimtable[JGE_BTN_PRI] = new KeyRep(NULL, _("Primary")); slimtable[JGE_BTN_SEC] = new KeyRep(NULL, _("Secondary")); - slimtable[JGE_BTN_PREV] = new KeyRep(NULL, _("Previous")); - slimtable[JGE_BTN_NEXT] = new KeyRep(NULL, _("Next")); + slimtable[JGE_BTN_PREV] = new KeyRep(NULL, _("Next phase/Previous item")); + slimtable[JGE_BTN_NEXT] = new KeyRep(NULL, _("Open hand/Next item")); return *slimtable[key]; } diff --git a/projects/mtg/src/WGui.cpp b/projects/mtg/src/WGui.cpp index fd638748e..62b0ba319 100644 --- a/projects/mtg/src/WGui.cpp +++ b/projects/mtg/src/WGui.cpp @@ -1756,4 +1756,16 @@ WGuiKeyBinder::WGuiKeyBinder(string name) : WGuiList(name), modal(false) Add(NEW OptionKey(it->first, it->second)); } bool WGuiKeyBinder::isModal() { return modal; } -bool WGuiKeyBinder::CheckUserInput(JButton key) { return false; } +bool WGuiKeyBinder::CheckUserInput(JButton key) +{ + switch (key) + { + case JGE_BTN_UP: + prevItem(); break; + case JGE_BTN_DOWN: + nextItem(); break; + default: + ; + } + return false; +}