]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gui/cheatMenu.h
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / gui / cheatMenu.h
index ea9a9d8536376b2eba8c13700176756d16da3b7f..b15858a48999012f8f743647fbff88fbe3845f96 100644 (file)
@@ -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 @@ class CheatMenu
        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;
 };