mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Map ui design updated
This commit is contained in:
parent
8d32ba5b8e
commit
9a799190ef
@ -46,16 +46,19 @@ COLORS: Dict[str, QColor] = {
|
||||
"dark_red": QColor(140, 20, 20),
|
||||
"red": QColor(200, 80, 80),
|
||||
"bright_red": QColor(150, 80, 80),
|
||||
"super_red": QColor(200, 120, 120),
|
||||
"blue": QColor(164, 164, 255),
|
||||
"super_red": QColor(227, 32, 0),
|
||||
"blue": QColor(0, 132, 255),
|
||||
"dark_blue": QColor(45, 62, 80),
|
||||
"white": QColor(255, 255, 255),
|
||||
"green": QColor(128, 186, 128),
|
||||
"bright_green": QColor(64, 200, 64),
|
||||
"black": QColor(0, 0, 0),
|
||||
"black_transparent": QColor(0, 0, 0, 64),
|
||||
"blue_transparent": QColor(164, 164, 255, 32),
|
||||
"red_transparent": QColor(255, 125, 125, 32)
|
||||
"black_transparent": QColor(0, 0, 0, 5),
|
||||
"blue_transparent": QColor(0, 132, 255, 20),
|
||||
"red_transparent": QColor(227, 32, 0, 20),
|
||||
"orange": QColor(254, 125, 10),
|
||||
"night_overlay": QColor(12, 20, 69),
|
||||
"dawn_dust_overlay": QColor(46, 38, 85),
|
||||
}
|
||||
|
||||
CP_SIZE = 24
|
||||
|
||||
@ -157,7 +157,7 @@ class QLiberationMap(QGraphicsView):
|
||||
if unit.threat_range > max_range:
|
||||
max_range = unit.threat_range
|
||||
if has_radar:
|
||||
scene.addEllipse(go_pos[0] - max_range/300.0 + 8, go_pos[1] - max_range/300.0 + 8, max_range/150.0, max_range/150.0, pen, brush)
|
||||
scene.addEllipse(go_pos[0] - max_range/300.0 + 8, go_pos[1] - max_range/300.0 + 8, max_range/150.0, max_range/150.0, brush, brush)
|
||||
added_objects.append(ground_object.obj_name)
|
||||
|
||||
for cp in self.game.theater.enemy_points():
|
||||
@ -214,15 +214,15 @@ class QLiberationMap(QGraphicsView):
|
||||
for connected_cp in cp.connected_points:
|
||||
pos2 = self._transform_point(connected_cp.position)
|
||||
if not cp.captured:
|
||||
color = CONST.COLORS["red"]
|
||||
color = CONST.COLORS["dark_red"]
|
||||
elif cp.captured:
|
||||
color = CONST.COLORS["blue"]
|
||||
color = CONST.COLORS["dark_blue"]
|
||||
else:
|
||||
color = CONST.COLORS["red"]
|
||||
color = CONST.COLORS["dark_red"]
|
||||
|
||||
pen = QPen(brush=color)
|
||||
pen.setColor(color)
|
||||
pen.setWidth(16)
|
||||
pen.setWidth(6)
|
||||
if cp.captured and not connected_cp.captured and Conflict.has_frontline_between(cp, connected_cp):
|
||||
if not cp.captured:
|
||||
scene.addLine(pos[0], pos[1], pos2[0], pos2[1], pen=pen)
|
||||
@ -234,7 +234,7 @@ class QLiberationMap(QGraphicsView):
|
||||
p1 = point_from_heading(pos2[0], pos2[1], h+180, 25)
|
||||
p2 = point_from_heading(pos2[0], pos2[1], h, 25)
|
||||
frontline_pen = QPen(brush=CONST.COLORS["bright_red"])
|
||||
frontline_pen.setColor(CONST.COLORS["bright_red"])
|
||||
frontline_pen.setColor(CONST.COLORS["orange"])
|
||||
frontline_pen.setWidth(18)
|
||||
scene.addLine(p1[0], p1[1], p2[0], p2[1], pen=frontline_pen)
|
||||
|
||||
@ -318,14 +318,14 @@ class QLiberationMap(QGraphicsView):
|
||||
pass
|
||||
elif self.game.current_turn_daytime == "night":
|
||||
ov = QPixmap(bg.width(), bg.height())
|
||||
ov.fill(QColor(40, 40, 150))
|
||||
ov.fill(CONST.COLORS["night_overlay"])
|
||||
overlay = scene.addPixmap(ov)
|
||||
effect = QGraphicsOpacityEffect()
|
||||
effect.setOpacity(0.7)
|
||||
overlay.setGraphicsEffect(effect)
|
||||
else:
|
||||
ov = QPixmap(bg.width(), bg.height())
|
||||
ov.fill(QColor(165, 100, 100))
|
||||
ov.fill(CONST.COLORS["dawn_dust_overlay"])
|
||||
overlay = scene.addPixmap(ov)
|
||||
effect = QGraphicsOpacityEffect()
|
||||
effect.setOpacity(0.3)
|
||||
|
||||
@ -97,9 +97,9 @@ class QMapControlPoint(QGraphicsRectItem):
|
||||
@property
|
||||
def pen_color(self) -> QColor:
|
||||
if self.parent.game.player_country in db.BLUEFOR_FACTIONS:
|
||||
return self.model.captured and CONST.COLORS["dark_blue"] or CONST.COLORS["bright_red"]
|
||||
return self.model.captured and CONST.COLORS["white"] or CONST.COLORS["white"]
|
||||
else:
|
||||
return self.model.captured and CONST.COLORS["bright_red"] or CONST.COLORS["dark_blue"]
|
||||
return self.model.captured and CONST.COLORS["white"] or CONST.COLORS["white"]
|
||||
|
||||
def openBaseMenu(self):
|
||||
self.baseMenu = QBaseMenu2(self.window(), self.model, self.game)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user