Parcourir la source

Merge pull request #6223 from Laserlicht/popup_coloor

Colorize opponent hero / castle / garison details frame
Ivan Savenko il y a 1 jour
Parent
commit
efa4be1b98
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      client/windows/InfoWindows.cpp

+ 9 - 0
client/windows/InfoWindows.cpp

@@ -296,6 +296,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGTownInstance * town)
 	OBJECT_CONSTRUCTION;
 	tooltip = std::make_shared<CTownTooltip>(Point(9, 10), iah);
 
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(town->getOwner());
+
 	addUsedEvents(DRAG_POPUP);
 
 	fitToScreen(10);
@@ -309,6 +312,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGHeroInstance * hero)
 
 	OBJECT_CONSTRUCTION;
 	tooltip = std::make_shared<CHeroTooltip>(Point(9, 10), iah);
+
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(hero->getOwner());
 	
 	addUsedEvents(DRAG_POPUP);
 
@@ -332,6 +338,9 @@ CInfoBoxPopup::CInfoBoxPopup(Point position, const CGGarrison * garr)
         tooltip = std::make_shared<CArmyTooltip>(Point(9, 10), iah);
 	}
 
+	if(settings["general"]["enableUiEnhancements"].Bool())
+		background->setPlayerColor(garr->getOwner());
+
 	addUsedEvents(DRAG_POPUP);
 
 	fitToScreen(10);