make selection box use the selection or deconstruct color to indicate the mode
This commit is contained in:
@@ -1028,7 +1028,17 @@ void WorldRenderer::drawOverlays(QPainter& painter, const WorldCoordinates& coor
|
||||
std::max(frame.boxStartTile.y(), frame.boxCurrentTile.y()) + 1);
|
||||
const QRectF selRect(coordinates.tileToWidget(tl),
|
||||
coordinates.tileToWidget(br));
|
||||
painter.setPen(QPen(m_visuals.overlays.selectionRect, 1));
|
||||
// In deconstruct mode the box marks buildings for demolition, so it is
|
||||
// drawn in the deconstruct red instead of the selection color; the
|
||||
// tint's alpha governs only the fills it tints, never this outline
|
||||
// (REQ-UI-MULTI-SELECT, REQ-BLD-DECONSTRUCT-BOX).
|
||||
QColor rectColor = m_visuals.overlays.selectedOutline;
|
||||
if (frame.buildMode.isDeconstructMode())
|
||||
{
|
||||
rectColor = m_visuals.overlays.deconstructTint;
|
||||
rectColor.setAlpha(255);
|
||||
}
|
||||
painter.setPen(QPen(rectColor, 1));
|
||||
painter.setBrush(Qt::NoBrush);
|
||||
painter.drawRect(selRect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user