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"
25 #include "gui/mousecursor.hpp"
26 #include "video/font.hpp"
28 /* Kinds of menu items */
40 MN_HL /* horizontal line */
46 MenuItem(MenuItemKind kind, int id = -1);
48 void set_help(const std::string& help_text);
50 void change_text (const std::string& text);
51 void change_input(const std::string& text);
53 static MenuItem* create(MenuItemKind kind, const std::string& text,
54 int init_toggle, Menu* target_menu, int id, int key);
56 std::string get_input_with_symbol(bool active_item); // returns the text with an input symbol
66 std::vector<std::string> list; // list of values for a STRINGSELECT item
67 size_t selected; // currently selected item
72 /// keyboard key or joystick button
73 bool input_flickering;
76 MenuItem(const MenuItem&);
77 MenuItem& operator=(const MenuItem&);