mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Paint timer color into player color
This commit is contained in:
parent
d4ab3087cb
commit
314a17cdd9
@ -15,6 +15,7 @@
|
|||||||
#include "../CPlayerInterface.h"
|
#include "../CPlayerInterface.h"
|
||||||
|
|
||||||
#include "../render/EFont.h"
|
#include "../render/EFont.h"
|
||||||
|
#include "../render/Graphics.h"
|
||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../gui/TextAlignment.h"
|
#include "../gui/TextAlignment.h"
|
||||||
#include "../widgets/Images.h"
|
#include "../widgets/Images.h"
|
||||||
@ -77,6 +78,13 @@ void TurnTimerWidget::setTime(int time)
|
|||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << turnTime / 60 << ":" << std::setw(2) << std::setfill('0') << turnTime % 60;
|
oss << turnTime / 60 << ":" << std::setw(2) << std::setfill('0') << turnTime % 60;
|
||||||
w->setText(oss.str());
|
w->setText(oss.str());
|
||||||
|
|
||||||
|
if(graphics && LOCPLINT && LOCPLINT->cb
|
||||||
|
&& variables["textColorFromPlayerColor"].Bool()
|
||||||
|
&& LOCPLINT->cb->getCurrentPlayer().isValidPlayer())
|
||||||
|
{
|
||||||
|
w->setColor(graphics->playerColors[LOCPLINT->cb->getCurrentPlayer()]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
"variables":
|
"variables":
|
||||||
{
|
{
|
||||||
"notificationTime": [0, 1, 2, 3, 4, 5, 20],
|
"notificationTime": [0, 1, 2, 3, 4, 5, 20],
|
||||||
"notificationSound": "WE5"
|
"notificationSound": "WE5",
|
||||||
|
"textColorFromPlayerColor": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user