From 04e77a97f2531da80a7a0e78d5bc620aeb893081 Mon Sep 17 00:00:00 2001 From: Donnie Date: Mon, 29 Jun 2020 17:32:29 -0400 Subject: [PATCH] Fix: map icons now match player side color (red or blue) --- qt_ui/widgets/map/QMapGroundObject.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qt_ui/widgets/map/QMapGroundObject.py b/qt_ui/widgets/map/QMapGroundObject.py index b28f2ea6..ea867638 100644 --- a/qt_ui/widgets/map/QMapGroundObject.py +++ b/qt_ui/widgets/map/QMapGroundObject.py @@ -42,6 +42,13 @@ class QMapGroundObject(QGraphicsRectItem): def paint(self, painter, option, widget=None): #super(QMapControlPoint, self).paint(painter, option, widget) + if self.parent.game.player_country in db.BLUEFOR_FACTIONS: + playerIcons = "_blue" + enemyIcons = "" + else: + playerIcons = "" + enemyIcons = "_blue" + if self.parent.get_display_rule("go"): painter.save() @@ -50,9 +57,9 @@ class QMapGroundObject(QGraphicsRectItem): cat = "ship" if not self.model.is_dead and not self.cp.captured: - painter.drawPixmap(option.rect, CONST.ICONS[cat]) + painter.drawPixmap(option.rect, CONST.ICONS[cat + enemyIcons]) elif not self.model.is_dead: - painter.drawPixmap(option.rect, CONST.ICONS[cat + "_blue"]) + painter.drawPixmap(option.rect, CONST.ICONS[cat + playerIcons]) else: painter.drawPixmap(option.rect, CONST.ICONS["destroyed"]) painter.restore()