3 Copyright (C) 2020 Elias Fleckenstein <eliasfleckenstein@web.de>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12 You should have received a copy of the GNU Lesser General Public License along
13 with this program; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "irrlichttypes_extrabloated.h"
23 #define CHEAT_MENU_GET_SCRIPTPTR \
24 ClientScripting *script = m_client->getScript(); \
25 if (!script || !script->m_cheats_loaded) \
30 enum CheatMenuEntryType
32 CHEAT_MENU_ENTRY_TYPE_HEAD,
33 CHEAT_MENU_ENTRY_TYPE_CATEGORY,
34 CHEAT_MENU_ENTRY_TYPE_ENTRY,
40 CheatMenu(Client *client);
44 return m_client->getScript();
47 void draw(video::IVideoDriver *driver, bool show_debug);
49 void drawEntry(video::IVideoDriver *driver, std::string name,
50 std::size_t column_align_index, std::size_t cheat_entry_index,
51 bool is_selected, bool is_enabled,
52 CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY);
61 bool m_cheat_layer = false;
62 int m_selected_cheat = 0;
63 int m_selected_category = 0;
65 int m_head_height = 20;
66 int m_entry_height = 20;
67 int m_entry_width = 150;
70 video::SColor m_bg_color = video::SColor(173, 45, 45, 68);
71 video::SColor m_active_bg_color = video::SColor(210, 0, 0, 0);
72 video::SColor m_font_color = video::SColor(195, 255, 255, 255);
73 video::SColor m_selected_font_color = video::SColor(235, 255, 255, 255);
77 gui::IGUIFont *m_font = nullptr;