diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:44:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:44:42 +0100 |
commit | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (patch) | |
tree | c980d614fec4a5495798be3e79e033229062c3cd /src/gui/cheatMenu.h | |
parent | 28f6a79706b088c37268a59d90878220dc4ef9c7 (diff) | |
parent | 3af10766fd2b58b068e970266724d7eb10e9316b (diff) | |
download | dragonfireclient-5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/gui/cheatMenu.h')
-rw-r--r-- | src/gui/cheatMenu.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h index ea9a9d853..b15858a48 100644 --- a/src/gui/cheatMenu.h +++ b/src/gui/cheatMenu.h @@ -19,7 +19,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once +#include "client/client.h" #include "irrlichttypes_extrabloated.h" +#include "script/scripting_client.h" +#include <cstddef> #include <string> #define CHEAT_MENU_GET_SCRIPTPTR \ @@ -27,22 +30,24 @@ with this program; if not, write to the Free Software Foundation, Inc., if (!script || !script->m_cheats_loaded) \ return; -class Client; - -typedef enum +enum CheatMenuEntryType { CHEAT_MENU_ENTRY_TYPE_HEAD, CHEAT_MENU_ENTRY_TYPE_CATEGORY, CHEAT_MENU_ENTRY_TYPE_ENTRY, -} CheatMenuEntryType; +}; class CheatMenu { public: CheatMenu(Client *client); + ClientScripting *getScript() { return m_client->getScript(); } + void draw(video::IVideoDriver *driver, bool show_debug); + void drawHUD(video::IVideoDriver *driver, double dtime); + void drawEntry(video::IVideoDriver *driver, std::string name, int number, bool selected, bool active, CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY); @@ -68,8 +73,12 @@ private: video::SColor m_font_color = video::SColor(255, 0, 0, 0); video::SColor m_selected_font_color = video::SColor(255, 255, 252, 88); + FontMode fontStringToEnum(std::string str); + Client *m_client; gui::IGUIFont *m_font = nullptr; v2u32 m_fontsize; + + float m_rainbow_offset = 0.0; }; |