Laserlicht 1 month ago
parent
commit
8a1062b9cd
3 changed files with 11 additions and 7 deletions
  1. 2 2
      client/lobby/BattleOnlyMode.cpp
  2. 8 4
      client/lobby/BattleOnlyMode.h
  3. 1 1
      client/lobby/SelectionTab.cpp

+ 2 - 2
client/lobby/BattleOnlyMode.cpp

@@ -262,7 +262,7 @@ void BattleOnlyModeHeroSelector::setHeroIcon()
 			setHeroIcon();
 			parent.setOkButtonEnabled();
 		}, selectedIndex, images, true, true);
-		window->onPopup = [this, heroes](int index) {
+		window->onPopup = [heroes](int index) {
 			if(index == 0)
 				return;
 			index--;
@@ -344,7 +344,7 @@ void BattleOnlyModeHeroSelector::setCreatureIcons()
 					setCreatureIcons();
 				});
 			}, selectedIndex, images, true, true);
-			window->onPopup = [this, creatures](int index) {
+			window->onPopup = [creatures](int index) {
 				if(index == 0)
 					return;
 				index--;

+ 8 - 4
client/lobby/BattleOnlyMode.h

@@ -12,14 +12,18 @@
 #include "../windows/CWindowObject.h"
 #include "../../lib/constants/EntityIdentifiers.h"
 
+
+VCMI_LIB_NAMESPACE_BEGIN
+class CGHeroInstance;
+class CCreatureSet;
+class CMap;
+class EditorCallback;
+VCMI_LIB_NAMESPACE_END
+
 class FilledTexturePlayerColored;
 class CButton;
 class CPicture;
 class CLabel;
-class CGHeroInstance;
-class CCreatureSet;
-class EditorCallback;
-class CMap;
 class BattleOnlyModeWindow;
 class CAnimImage;
 class GraphicalPrimitiveCanvas;

+ 1 - 1
client/lobby/SelectionTab.cpp

@@ -246,7 +246,7 @@ SelectionTab::SelectionTab(ESelectionScreen Type)
 
 		if(tabType == ESelectionScreen::newGame && !isMultiplayer)
 		{
-			buttonBattleOnlyMode = std::make_shared<CButton>(Point(23, 18), AnimationPath::builtin("lobby/battleButton"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode")), [this, tabTitle, tabTitleDelete](){
+			buttonBattleOnlyMode = std::make_shared<CButton>(Point(23, 18), AnimationPath::builtin("lobby/battleButton"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode")), [tabTitle, tabTitleDelete](){
 				BattleOnlyMode::openBattleWindow();
 			});
 		}