* Grab the keyboard and display the grabbed key.
* Include a tentative interface for the initial message. It's ugly.
This commit is contained in:
jean.chalard
2010-02-18 08:03:22 +00:00
parent 3c1377fe47
commit c87a98eb14
6 changed files with 82 additions and 37 deletions

View File

@@ -1742,26 +1742,21 @@ string WGuiFilterItem::getCode(){
return mCode;
}
WGuiKeyBinder::WGuiKeyBinder(string name) : WGuiList(name), modal(false)
{
WGuiKeyBinder::WGuiKeyBinder(string name, GameStateOptions* parent) : WGuiList(name), parent(parent), modal(false) {
JGE* j = JGE::GetInstance();
JGE::keybindings_it start = j->KeyBindings_begin(), end = j->KeyBindings_end();
u32 y = 40;
for (JGE::keybindings_it it = start; it != end; ++it)
Add(NEW OptionKey(it->first, it->second));
Add(NEW OptionKey(parent, it->first, it->second));
}
bool WGuiKeyBinder::isModal() { return modal; }
bool WGuiKeyBinder::CheckUserInput(JButton key)
{
switch (key)
{
case JGE_BTN_UP:
prevItem(); break;
case JGE_BTN_DOWN:
nextItem(); break;
switch (key) {
case JGE_BTN_OK: items[currentItem]->CheckUserInput(key); break;
default:
;
return WGuiList::CheckUserInput(key);
}
return false;
}