From f698cb66b8c50a1f017dfd1f3a06a20ea4e0b8d2 Mon Sep 17 00:00:00 2001 From: Khopa Date: Tue, 8 Oct 2019 21:07:06 +0200 Subject: [PATCH] Ally SAM are shown with blue icon on map. --- qt_ui/uiconstants.py | 1 + qt_ui/widgets/map/QMapGroundObject.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 5bb607b9..d5f0f9e9 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -64,6 +64,7 @@ def load_icons(): ICONS["cleared"] = QPixmap("./resources/ui/ground_assets/cleared.png") for category in CATEGORY_MAP.keys(): ICONS[category] = QPixmap("./resources/ui/ground_assets/" + category + ".png") + ICONS["aa_blue"] = QPixmap("./resources/ui/ground_assets/aa_blue.png") ICONS["Generator"] = QPixmap("./resources/ui/misc/generator.png") ICONS["Missile"] = QPixmap("./resources/ui/misc/missile.png") diff --git a/qt_ui/widgets/map/QMapGroundObject.py b/qt_ui/widgets/map/QMapGroundObject.py index a6b5fd1f..e8472588 100644 --- a/qt_ui/widgets/map/QMapGroundObject.py +++ b/qt_ui/widgets/map/QMapGroundObject.py @@ -1,3 +1,4 @@ +from PySide2.QtGui import QPainter from PySide2.QtWidgets import QGraphicsRectItem import qt_ui.uiconstants as CONST @@ -37,6 +38,8 @@ class QMapGroundObject(QGraphicsRectItem): painter.save() if not self.model.is_dead and not self.cp.captured: painter.drawPixmap(option.rect, CONST.ICONS[self.model.category]) + elif not self.model.is_dead and self.model.category == "aa": + painter.drawPixmap(option.rect, CONST.ICONS["aa_blue"]) else: painter.drawPixmap(option.rect, CONST.ICONS["cleared"]) painter.restore()