aboutsummaryrefslogtreecommitdiff
path: root/src/gui/cheatMenu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/cheatMenu.h')
-rw-r--r--src/gui/cheatMenu.h17
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;
};