Implement city production projects for units and buildings
This commit is contained in:
+10
-3
@@ -1094,6 +1094,10 @@ void QSceneRenderer::drawCityViewOverlay(QPainter &painter, const QMatrix4x4 &vM
|
||||
{
|
||||
m_citySlotHits.clear();
|
||||
m_cityBuyTileHits.clear();
|
||||
m_cityProjectHits.clear();
|
||||
m_cancelProjectBtnRect = QRect();
|
||||
m_tabBuildingsRect = QRect();
|
||||
m_tabUnitsRect = QRect();
|
||||
City *city = GameManager::instance().getActiveCityView();
|
||||
if (!city) return;
|
||||
|
||||
@@ -1230,10 +1234,12 @@ void QSceneRenderer::drawCityViewOverlay(QPainter &painter, const QMatrix4x4 &vM
|
||||
QString costStr = QString("%L1").arg(cultureCost);
|
||||
painter.drawText(QRect(buyRect.left() + 22, buyRect.top() + 2, buyRect.width() - 24, 13), Qt::AlignLeft | Qt::AlignVCenter, costStr);
|
||||
|
||||
// "Koop" subtitle
|
||||
// "Buy" subtitle
|
||||
painter.setFont(QFont("sans-serif", 6, QFont::Bold));
|
||||
painter.setPen(canAfford ? QColor(220, 140, 255) : QColor(140, 120, 155));
|
||||
painter.drawText(QRect(buyRect.left() + 22, buyRect.top() + 14, buyRect.width() - 24, 12), Qt::AlignLeft | Qt::AlignVCenter, "KOOP");
|
||||
painter.drawText(QRect(buyRect.left() + 22, buyRect.top() + 14, buyRect.width() - 24, 12),
|
||||
Qt::AlignLeft | Qt::AlignVCenter,
|
||||
Localization::instance().get("ui.city.buy_tile", "BUY"));
|
||||
} else {
|
||||
// Owned by another city
|
||||
QRect lockRect((int)sCenter.x() - 16, (int)sCenter.y() - 8, 32, 16);
|
||||
@@ -1242,7 +1248,8 @@ void QSceneRenderer::drawCityViewOverlay(QPainter &painter, const QMatrix4x4 &vM
|
||||
painter.drawRoundedRect(lockRect, 3, 3);
|
||||
painter.setFont(QFont("sans-serif", 6, QFont::Bold));
|
||||
painter.setPen(QColor(230, 130, 130));
|
||||
painter.drawText(lockRect, Qt::AlignCenter, "BEZET");
|
||||
painter.drawText(lockRect, Qt::AlignCenter,
|
||||
Localization::instance().get("ui.city.occupied", "OCCUPIED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user