mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Reduce usage of implicit conversions to int
This commit is contained in:
@@ -55,18 +55,18 @@ TurnTimerWidget::TurnTimerWidget(const Point & position, PlayerColor player)
|
||||
pos.w = 76;
|
||||
|
||||
pos.h += 20;
|
||||
playerLabelsMain[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player], "");
|
||||
playerLabelsMain[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player.getNum()], "");
|
||||
|
||||
if (timers.battleTimer != 0)
|
||||
{
|
||||
pos.h += 20;
|
||||
playerLabelsBattle[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player], "");
|
||||
playerLabelsBattle[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player.getNum()], "");
|
||||
}
|
||||
|
||||
if (!timers.accumulatingUnitTimer && timers.unitTimer != 0)
|
||||
{
|
||||
pos.h += 20;
|
||||
playerLabelsUnit[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player], "");
|
||||
playerLabelsUnit[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player.getNum()], "");
|
||||
}
|
||||
|
||||
updateTextLabel(player, GAME->interface()->cb->getPlayerTurnTime(player));
|
||||
@@ -87,7 +87,7 @@ TurnTimerWidget::TurnTimerWidget(const Point & position, PlayerColor player)
|
||||
continue;
|
||||
|
||||
pos.h += 20;
|
||||
playerLabelsMain[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player], "");
|
||||
playerLabelsMain[player] = std::make_shared<CLabel>(pos.w / 2, pos.h - 10, FONT_BIG, ETextAlignment::CENTER, graphics->playerColors[player.getNum()], "");
|
||||
|
||||
updateTextLabel(player, GAME->interface()->cb->getPlayerTurnTime(player));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user