aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-10-18 13:16:09 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-10-18 13:16:09 +0200
commitc1aea404b862256e6bf9316eeb8f32c72b78a4c2 (patch)
treec85049475ebac3b891521caf0fd69de40060bb2d /src/gui
parent3a718f12b433ef3980c8fc6e29957595110cd8f4 (diff)
downloaddragonfireclient-c1aea404b862256e6bf9316eeb8f32c72b78a4c2.tar.xz
Lint is bitch
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/cheatMenu.cpp28
-rw-r--r--src/gui/cheatMenu.h14
2 files changed, 21 insertions, 21 deletions
diff --git a/src/gui/cheatMenu.cpp b/src/gui/cheatMenu.cpp
index b22b8da30..b103e6301 100644
--- a/src/gui/cheatMenu.cpp
+++ b/src/gui/cheatMenu.cpp
@@ -37,8 +37,8 @@ CheatMenu::CheatMenu(Client *client) : m_client(client)
m_fontsize.Y = MYMAX(m_fontsize.Y, 1);
}
-void CheatMenu::drawEntry(video::IVideoDriver* driver, std::string name, int number,
- bool selected, bool active, CheatMenuEntryType entry_type)
+void CheatMenu::drawEntry(video::IVideoDriver *driver, std::string name, int number,
+ bool selected, bool active, CheatMenuEntryType entry_type)
{
int x = m_gap, y = m_gap, width = m_entry_width, height = m_entry_height;
video::SColor *bgcolor = &m_bg_color, *fontcolor = &m_font_color;
@@ -49,7 +49,7 @@ void CheatMenu::drawEntry(video::IVideoDriver* driver, std::string name, int num
bool is_category = entry_type == CHEAT_MENU_ENTRY_TYPE_CATEGORY;
y += m_gap + m_head_height +
(number + (is_category ? 0 : m_selected_category)) *
- (m_entry_height + m_gap);
+ (m_entry_height + m_gap);
x += (is_category ? 0 : m_gap + m_entry_width);
if (active)
bgcolor = &m_active_bg_color;
@@ -70,7 +70,7 @@ void CheatMenu::drawEntry(video::IVideoDriver* driver, std::string name, int num
void CheatMenu::draw(video::IVideoDriver* driver, bool show_debug)
{
CHEAT_MENU_GET_SCRIPTPTR
-
+
if (!show_debug)
drawEntry(driver, "Dragonfireclient", 0, false, false,
CHEAT_MENU_ENTRY_TYPE_HEAD);
@@ -97,11 +97,11 @@ void CheatMenu::draw(video::IVideoDriver* driver, bool show_debug)
void CheatMenu::selectUp()
{
CHEAT_MENU_GET_SCRIPTPTR
-
+
int max = (m_cheat_layer ? script->m_cheat_categories[m_selected_category]
- ->m_cheats.size()
- : script->m_cheat_categories.size()) -
- 1;
+ ->m_cheats.size()
+ : script->m_cheat_categories.size()) -
+ 1;
int *selected = m_cheat_layer ? &m_selected_cheat : &m_selected_category;
--*selected;
if (*selected < 0)
@@ -111,11 +111,11 @@ void CheatMenu::selectUp()
void CheatMenu::selectDown()
{
CHEAT_MENU_GET_SCRIPTPTR
-
+
int max = (m_cheat_layer ? script->m_cheat_categories[m_selected_category]
- ->m_cheats.size()
- : script->m_cheat_categories.size()) -
- 1;
+ ->m_cheats.size()
+ : script->m_cheat_categories.size()) -
+ 1;
int *selected = m_cheat_layer ? &m_selected_cheat : &m_selected_category;
++*selected;
if (*selected > max)
@@ -140,8 +140,8 @@ void CheatMenu::selectLeft()
void CheatMenu::selectConfirm()
{
CHEAT_MENU_GET_SCRIPTPTR
-
+
if (m_cheat_layer)
script->toggle_cheat(script->m_cheat_categories[m_selected_category]
- ->m_cheats[m_selected_cheat]);
+ ->m_cheats[m_selected_cheat]);
}
diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h
index de369485c..3c4bec471 100644
--- a/src/gui/cheatMenu.h
+++ b/src/gui/cheatMenu.h
@@ -22,9 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include <string>
-#define CHEAT_MENU_GET_SCRIPTPTR \
- ClientScripting *script = m_client->getScript(); \
- if (! script || ! script->m_cheats_loaded) \
+#define CHEAT_MENU_GET_SCRIPTPTR \
+ ClientScripting *script = m_client->getScript(); \
+ if (! script || ! script->m_cheats_loaded) \
return;
class Client;
@@ -39,11 +39,11 @@ typedef enum
class CheatMenu
{
public:
- CheatMenu(Client* client);
+ CheatMenu(Client *client);
- void draw(video::IVideoDriver* driver, bool show_debug);
+ void draw(video::IVideoDriver *driver, bool show_debug);
- void drawEntry(video::IVideoDriver* driver, std::string name, int number,
+ void drawEntry(video::IVideoDriver *driver, std::string name, int number,
bool selected, bool active,
CheatMenuEntryType entry_type = CHEAT_MENU_ENTRY_TYPE_ENTRY);
@@ -66,7 +66,7 @@ private:
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);
+ video::SColor m_selected_font_color = video::SColor(255, 255, 252, 88);
Client *m_client;