diff options
author | realOneplustwo <oneplustwoisyes@gmail.com> | 2020-10-21 17:58:16 -0700 |
---|---|---|
committer | realOneplustwo <oneplustwoisyes@gmail.com> | 2020-10-21 17:58:16 -0700 |
commit | 19143bedf43d174af092a1c0b5974dba9ce34f9a (patch) | |
tree | dc8ca12eff45ddd04a3ba789ae7df4404acde300 /src/gui/cheatMenu.h | |
parent | b29d6bc196b3a6bafa1b200e8944cf277b0bc9c1 (diff) | |
parent | 519f98c65f1190482724bde4555ff013f28a6c5d (diff) | |
download | dragonfireclient-19143bedf43d174af092a1c0b5974dba9ce34f9a.tar.xz |
Make cheat menu color and font configurable via settings
Diffstat (limited to 'src/gui/cheatMenu.h')
-rw-r--r-- | src/gui/cheatMenu.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h index 350bf9ac3..6ff8d67c6 100644 --- a/src/gui/cheatMenu.h +++ b/src/gui/cheatMenu.h @@ -16,8 +16,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once +#include "client/client.h" #include "irrlichttypes_extrabloated.h" -#include "settings.h" +#include "script/scripting_client.h" #include <cstddef> #include <string> @@ -26,8 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc., if (!script || !script->m_cheats_loaded) \ return; -class Client; - enum CheatMenuEntryType { CHEAT_MENU_ENTRY_TYPE_HEAD, @@ -40,12 +39,17 @@ class CheatMenu public: CheatMenu(Client *client); + ClientScripting *getScript() + { + return m_client->getScript(); + } + void draw(video::IVideoDriver *driver, bool show_debug); void drawEntry(video::IVideoDriver *driver, std::string name, - std::size_t column_align_index, std::size_t cheat_entry_index, - bool is_selected, bool is_enabled, - CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY); + std::size_t column_align_index, std::size_t cheat_entry_index, + bool is_selected, bool is_enabled, + CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY); void selectUp(); void selectDown(); @@ -68,8 +72,6 @@ private: video::SColor m_font_color = video::SColor(195, 255, 255, 255); video::SColor m_selected_font_color = video::SColor(235, 255, 255, 255); - FontMode fontStringToEnum(std::string str); - Client *m_client; gui::IGUIFont *m_font = nullptr; |