mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Ship icons for ship groups
This commit is contained in:
@@ -74,6 +74,8 @@ def load_icons():
|
||||
ICONS[category] = QPixmap("./resources/ui/ground_assets/" + category + ".png")
|
||||
ICONS[category + "_blue"] = QPixmap("./resources/ui/ground_assets/" + category + "_blue.png")
|
||||
ICONS["destroyed"] = QPixmap("./resources/ui/ground_assets/destroyed.png")
|
||||
ICONS["ship"] = QPixmap("./resources/ui/ground_assets/ship.png")
|
||||
ICONS["ship_blue"] = QPixmap("./resources/ui/ground_assets/ship_blue.png")
|
||||
|
||||
ICONS["Generator"] = QPixmap("./resources/ui/misc/generator.png")
|
||||
ICONS["Missile"] = QPixmap("./resources/ui/misc/missile.png")
|
||||
|
||||
@@ -44,10 +44,15 @@ class QMapGroundObject(QGraphicsRectItem):
|
||||
#super(QMapControlPoint, self).paint(painter, option, widget)
|
||||
if self.parent.get_display_rule("go"):
|
||||
painter.save()
|
||||
|
||||
cat = self.model.category
|
||||
if cat == "aa" and self.model.sea_object:
|
||||
cat = "ship"
|
||||
|
||||
if not self.model.is_dead and not self.cp.captured:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[self.model.category])
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat])
|
||||
elif not self.model.is_dead:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[self.model.category + "_blue"])
|
||||
painter.drawPixmap(option.rect, CONST.ICONS[cat + "_blue"])
|
||||
else:
|
||||
painter.drawPixmap(option.rect, CONST.ICONS["destroyed"])
|
||||
painter.restore()
|
||||
|
||||
Reference in New Issue
Block a user