Bläddra i källkod

use playerColored

Michael 2 år sedan
förälder
incheckning
b2c8cab9f1
3 ändrade filer med 5 tillägg och 2 borttagningar
  1. BIN
      Mods/vcmi/Data/DlgBluBk.png
  2. 3 1
      client/lobby/OptionsTab.cpp
  3. 2 1
      client/lobby/OptionsTab.h

BIN
Mods/vcmi/Data/DlgBluBk.png


+ 3 - 1
client/lobby/OptionsTab.cpp

@@ -21,6 +21,7 @@
 #include "../render/IFont.h"
 #include "../widgets/CComponent.h"
 #include "../widgets/Buttons.h"
+#include "../widgets/Images.h"
 #include "../widgets/MiscWidgets.h"
 #include "../widgets/ObjectLists.h"
 #include "../widgets/Slider.h"
@@ -522,7 +523,8 @@ void OptionsTab::SelectionWindow::recreate()
 
 	pos = Rect(0, 0, x, y);
 
-	backgroundTexture = std::make_shared<CFilledTexture>("DlgBluBk", pos);
+	backgroundTexture = std::make_shared<FilledTexturePlayerColored>("DiBoxBck", pos);
+	backgroundTexture->playerColored(PlayerColor(1));
 	updateShadow();
 
 	if(type == SelType::TOWN)

+ 2 - 1
client/lobby/OptionsTab.h

@@ -17,6 +17,7 @@ struct PlayerInfo;
 VCMI_LIB_NAMESPACE_END
 
 #include "../widgets/Scrollable.h"
+#include "../widgets/Images.h"
 #include "../../lib/mapping/CMapHeader.h"
 
 class CSlider;
@@ -102,7 +103,7 @@ public:
 		PlayerColor color;
 		SelType type;
 
-		std::shared_ptr<CFilledTexture> backgroundTexture;
+		std::shared_ptr<FilledTexturePlayerColored> backgroundTexture;
 		std::vector<std::shared_ptr<CIntObject>> components;
 
 		std::vector<FactionID> factions;