From af347242b4f196cef9fd67d823c6ac17a69c6f37 Mon Sep 17 00:00:00 2001 From: Michael <13953785+Laserlicht@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:34:31 +0200 Subject: [PATCH] fix compile error --- client/lobby/OptionsTab.cpp | 10 +++++----- client/lobby/OptionsTab.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/lobby/OptionsTab.cpp b/client/lobby/OptionsTab.cpp index 7d16085f4..3892eae44 100644 --- a/client/lobby/OptionsTab.cpp +++ b/client/lobby/OptionsTab.cpp @@ -660,7 +660,7 @@ int OptionsTab::SelectionWindow::getElement(const Point & cursorPosition) return x + y * elementsPerLine; } -void OptionsTab::SelectionWindow::setElement(int elem, bool apply) +void OptionsTab::SelectionWindow::setElement(int elem, bool doApply) { PlayerSettings set = PlayerSettings(); if(type == SelType::TOWN) @@ -678,7 +678,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool apply) } if(set.castle != PlayerSettings::NONE) { - if(!apply) + if(!doApply) { CPlayerSettingsHelper helper = CPlayerSettingsHelper(set, SelType::TOWN); GH.windows().createAndPushWindow(helper); @@ -700,7 +700,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool apply) } if(set.hero != PlayerSettings::NONE) { - if(!apply) + if(!doApply) { CPlayerSettingsHelper helper = CPlayerSettingsHelper(set, SelType::HERO); GH.windows().createAndPushWindow(helper); @@ -714,7 +714,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool apply) set.bonus = static_cast(elem-1); if(set.bonus != PlayerSettings::NONE) { - if(!apply) + if(!doApply) { CPlayerSettingsHelper helper = CPlayerSettingsHelper(set, SelType::BONUS); GH.windows().createAndPushWindow(helper); @@ -722,7 +722,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool apply) } } - if(apply) + if(doApply) apply(); } diff --git a/client/lobby/OptionsTab.h b/client/lobby/OptionsTab.h index fab3a5859..fc8f515b7 100644 --- a/client/lobby/OptionsTab.h +++ b/client/lobby/OptionsTab.h @@ -98,7 +98,7 @@ public: class SelectionWindow : public CWindowObject { - const int ICON_SMALL_WIDTH = 48; + //const int ICON_SMALL_WIDTH = 48; const int ICON_SMALL_HEIGHT = 32; const int ICON_BIG_WIDTH = 58; const int ICON_BIG_HEIGHT = 64; @@ -138,7 +138,7 @@ public: void recreate(); void setSelection(); int getElement(const Point & cursorPosition); - void setElement(int element, bool apply); + void setElement(int element, bool doApply); void clickReleased(const Point & cursorPosition) override; void showPopupWindow(const Point & cursorPosition) override;