3 Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
4 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
5 Copyright (C) 2011 teddydestodes <derkomtur@schattengang.net>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef GUIKEYCHANGEMENU_HEADER
23 #define GUIKEYCHANGEMENU_HEADER
25 #include "common_irrlicht.h"
27 #include "modalMenu.h"
32 static const char *KeyNames[] =
33 { "-", gettext("Left Button"), gettext("Right Button"), gettext("Cancel"), gettext("Middle Button"), gettext("X Button 1"),
34 gettext("X Button 2"), "-", gettext("Back"), gettext("Tab"), "-", "-", gettext("Clear"), gettext("Return"), "-",
35 "-", gettext("Shift"), gettext("Control"), gettext("Menu"), gettext("Pause"), gettext("Capital"), gettext("Kana"), "-",
36 gettext("Junja"), gettext("Final"), gettext("Kanji"), "-", gettext("Escape"), gettext("Convert"), gettext("Nonconvert"),
37 gettext("Accept"), gettext("Mode Change"), gettext("Space"), gettext("Priot"), gettext("Next"), gettext("End"), gettext("Home"),
38 gettext("Left"), gettext("Up"), gettext("Right"), gettext("Down"), gettext("Select"), gettext("Print"), gettext("Execute"),
39 gettext("Snapshot"), gettext("Insert"), gettext("Delete"), gettext("Help"), "0", "1", "2", "3", "4", "5",
40 "6", "7", "8", "9", "-", "-", "-", "-", "-", "-", "-", "A", "B", "C",
41 "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q",
42 "R", "S", "T", "U", "V", "W", "X", "Y", "Z", gettext("Left Windows"),
43 gettext("Right Windows"), gettext("Apps"), "-", gettext("Sleep"), gettext("Numpad 0"), gettext("Numpad 1"),
44 gettext("Numpad 2"), gettext("Numpad 3"), gettext("Numpad 4"), gettext("Numpad 5"), gettext("Numpad 6"), gettext("Numpad 7"),
45 gettext("Numpad 8"), gettext("Numpad 9"), gettext("Numpad *"), gettext("Numpad +"), gettext("Numpad /"), gettext("Numpad -"),
46 "Numpad .", "Numpad /", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
47 "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18",
48 "F19", "F20", "F21", "F22", "F23", "F24", "-", "-", "-", "-", "-", "-",
49 "-", "-", gettext("Num Lock"), gettext("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-",
50 "-", "-", "-", "-", "-", "-", "-", gettext("Left Shift"), gettext("Right Shight"),
51 gettext("Left Control"), gettext("Right Control"), gettext("Left Menu"), gettext("Right Menu"), "-", "-",
52 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
53 "-", "-", "-", "-", "-", gettext("Plus"), gettext("Comma"), gettext("Minus"), gettext("Period"), "-", "-",
54 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
55 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
56 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
57 "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", gettext("Attn"), gettext("CrSel"),
58 gettext("ExSel"), gettext("Erase OEF"), gettext("Play"), gettext("Zoom"), gettext("PA1"), gettext("OEM Clear"), "-" };
61 GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR,
63 GUI_ID_KEY_FORWARD_BUTTON,
64 GUI_ID_KEY_BACKWARD_BUTTON,
65 GUI_ID_KEY_LEFT_BUTTON,
66 GUI_ID_KEY_RIGHT_BUTTON,
67 GUI_ID_KEY_USE_BUTTON,
68 GUI_ID_KEY_FLY_BUTTON,
69 GUI_ID_KEY_FAST_BUTTON,
70 GUI_ID_KEY_JUMP_BUTTON,
71 GUI_ID_KEY_CHAT_BUTTON,
72 GUI_ID_KEY_SNEAK_BUTTON,
73 GUI_ID_KEY_INVENTORY_BUTTON,
74 GUI_ID_KEY_DUMP_BUTTON,
75 GUI_ID_KEY_RANGE_BUTTON
78 class GUIKeyChangeMenu: public GUIModalMenu
81 GUIKeyChangeMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent,
82 s32 id, IMenuManager *menumgr);
85 void removeChildren();
87 Remove and re-add (or reposition) stuff
89 void regenerateGui(v2u32 screensize);
95 bool OnEvent(const SEvent& event);
103 gui::IGUIButton *forward;
104 gui::IGUIButton *backward;
105 gui::IGUIButton *left;
106 gui::IGUIButton *right;
107 gui::IGUIButton *use;
108 gui::IGUIButton *sneak;
109 gui::IGUIButton *jump;
110 gui::IGUIButton *inventory;
111 gui::IGUIButton *fly;
112 gui::IGUIButton *fast;
113 gui::IGUIButton *range;
114 gui::IGUIButton *dump;
115 gui::IGUIButton *chat;