2 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef HEADER_SUPERTUX_GUI_MENU_ITEM_HPP
18 #define HEADER_SUPERTUX_GUI_MENU_ITEM_HPP
24 #include "gui/menu.hpp"
26 /* Kinds of menu items */
38 MN_HL /* horizontal line */
44 MenuItem(MenuItemKind kind, int id = -1);
46 void set_help(const std::string& help_text);
48 void change_text (const std::string& text);
49 void change_input(const std::string& text);
51 static MenuItem* create(MenuItemKind kind, const std::string& text,
52 int init_toggle, Menu* target_menu, int id, int key);
54 std::string get_input_with_symbol(bool active_item); // returns the text with an input symbol
64 std::vector<std::string> list; // list of values for a STRINGSELECT item
65 size_t selected; // currently selected item
70 /// keyboard key or joystick button
71 bool input_flickering;
74 MenuItem(const MenuItem&);
75 MenuItem& operator=(const MenuItem&);