Ally SAM are shown with blue icon on map.

This commit is contained in:
Khopa 2019-10-08 21:07:06 +02:00
parent fc51b16e4a
commit f698cb66b8
2 changed files with 4 additions and 0 deletions

View File

@ -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")

View File

@ -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()