diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-18 12:54:08 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-18 12:54:08 +0200 |
commit | 3a718f12b433ef3980c8fc6e29957595110cd8f4 (patch) | |
tree | f7c05e501df2c9a40d62ba13b0a3b9b78b394959 /src/gui/cheatMenu.h | |
parent | 3b596a96e07bf8f799be6c21a546355980e34b94 (diff) | |
download | dragonfireclient-3a718f12b433ef3980c8fc6e29957595110cd8f4.tar.xz |
Make lint happy; Remove stupid redirector
Diffstat (limited to 'src/gui/cheatMenu.h')
-rw-r--r-- | src/gui/cheatMenu.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h index aaa433ceb..de369485c 100644 --- a/src/gui/cheatMenu.h +++ b/src/gui/cheatMenu.h @@ -15,14 +15,17 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ +*/ #pragma once #include "irrlichttypes_extrabloated.h" #include <string> -#define CHEAT_MENU_GET_SCRIPTPTR ClientScripting *script = m_client->getScript(); if (! script || ! script->m_cheats_loaded) return; +#define CHEAT_MENU_GET_SCRIPTPTR \ + ClientScripting *script = m_client->getScript(); \ + if (! script || ! script->m_cheats_loaded) \ + return; class Client; @@ -31,42 +34,42 @@ typedef enum CHEAT_MENU_ENTRY_TYPE_HEAD, CHEAT_MENU_ENTRY_TYPE_CATEGORY, CHEAT_MENU_ENTRY_TYPE_ENTRY, -} -CheatMenuEntryType; +} CheatMenuEntryType; class CheatMenu { public: CheatMenu(Client* client); - + void draw(video::IVideoDriver* driver, bool show_debug); - - void drawEntry(video::IVideoDriver* driver, std::string name, int number, bool selected, bool active, CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY); - + + void drawEntry(video::IVideoDriver* driver, std::string name, int number, + bool selected, bool active, + CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY); + void selectUp(); void selectDown(); void selectLeft(); void selectRight(); void selectConfirm(); - + private: bool m_cheat_layer = false; int m_selected_cheat = 0; int m_selected_category = 0; - + int m_head_height = 50; int m_entry_height = 40; int m_entry_width = 200; int m_gap = 3; - + video::SColor m_bg_color = video::SColor(192, 255, 145, 88); video::SColor m_active_bg_color = video::SColor(192, 255, 87, 53); video::SColor m_font_color = video::SColor(255, 0, 0, 0); video::SColor m_selected_font_color = video::SColor(255, 255, 252, 88); - Client *m_client; - + gui::IGUIFont *m_font = nullptr; v2u32 m_fontsize; }; |