style: add dividers and styled boxes to HUD sections
- Add horizontal line separator after header - Add styled boxes with borders for: gear, P/L, cost metrics, cost breakdown, combat, damage - Add separators between major sections - Footer separator before time/drag hint - Each section has distinct background color and border
This commit is contained in:
parent
ab89b3350f
commit
e356b037ac
|
|
@ -392,11 +392,19 @@ class HUDOverlay(QWidget):
|
||||||
|
|
||||||
layout.addLayout(header)
|
layout.addLayout(header)
|
||||||
|
|
||||||
|
# Separator after header
|
||||||
|
sep1 = QFrame()
|
||||||
|
sep1.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep1.setStyleSheet("background-color: rgba(255, 215, 0, 50);")
|
||||||
|
sep1.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep1)
|
||||||
|
|
||||||
# === GEAR INFO (if enabled) ===
|
# === GEAR INFO (if enabled) ===
|
||||||
if self.hud_config.show_gear_info:
|
if self.hud_config.show_gear_info:
|
||||||
self.gear_frame = QFrame()
|
gear_box = QFrame()
|
||||||
gear_layout = QVBoxLayout(self.gear_frame)
|
gear_box.setStyleSheet("background-color: rgba(255, 255, 255, 5); border-radius: 4px;")
|
||||||
gear_layout.setContentsMargins(0, 0, 0, 0)
|
gear_layout = QVBoxLayout(gear_box)
|
||||||
|
gear_layout.setContentsMargins(6, 4, 6, 4)
|
||||||
gear_layout.setSpacing(2)
|
gear_layout.setSpacing(2)
|
||||||
|
|
||||||
self.weapon_label = QLabel("W: None")
|
self.weapon_label = QLabel("W: None")
|
||||||
|
|
@ -407,20 +415,14 @@ class HUDOverlay(QWidget):
|
||||||
gear_layout.addWidget(self.armor_label)
|
gear_layout.addWidget(self.armor_label)
|
||||||
gear_layout.addWidget(self.loadout_label)
|
gear_layout.addWidget(self.loadout_label)
|
||||||
|
|
||||||
layout.addWidget(self.gear_frame)
|
layout.addWidget(gear_box)
|
||||||
|
|
||||||
# Separator
|
|
||||||
sep = QFrame()
|
|
||||||
sep.setFrameShape(QFrame.Shape.HLine)
|
|
||||||
sep.setStyleSheet("background-color: rgba(255, 215, 0, 50);")
|
|
||||||
sep.setFixedHeight(1)
|
|
||||||
layout.addWidget(sep)
|
|
||||||
|
|
||||||
# === CORE: P/L + Return % ===
|
# === CORE: P/L + Return % ===
|
||||||
if self.hud_config.show_profit_loss or self.hud_config.show_return_pct:
|
if self.hud_config.show_profit_loss or self.hud_config.show_return_pct:
|
||||||
core_frame = QFrame()
|
core_box = QFrame()
|
||||||
core_layout = QHBoxLayout(core_frame)
|
core_box.setStyleSheet("background-color: rgba(0, 0, 0, 50); border: 1px solid rgba(255, 215, 0, 30); border-radius: 4px;")
|
||||||
core_layout.setContentsMargins(0, 4, 0, 4)
|
core_layout = QHBoxLayout(core_box)
|
||||||
|
core_layout.setContentsMargins(8, 6, 8, 6)
|
||||||
|
|
||||||
if self.hud_config.show_profit_loss:
|
if self.hud_config.show_profit_loss:
|
||||||
self.profit_label = QLabel("P/L: 0.00 PED")
|
self.profit_label = QLabel("P/L: 0.00 PED")
|
||||||
|
|
@ -434,7 +436,7 @@ class HUDOverlay(QWidget):
|
||||||
self.return_label.setStyleSheet("font-size: 16px; font-weight: bold;")
|
self.return_label.setStyleSheet("font-size: 16px; font-weight: bold;")
|
||||||
core_layout.addWidget(self.return_label)
|
core_layout.addWidget(self.return_label)
|
||||||
|
|
||||||
layout.addWidget(core_frame)
|
layout.addWidget(core_box)
|
||||||
|
|
||||||
# === TOTAL COST + LOOT SUMMARY ===
|
# === TOTAL COST + LOOT SUMMARY ===
|
||||||
if self.hud_config.show_total_cost:
|
if self.hud_config.show_total_cost:
|
||||||
|
|
@ -481,11 +483,19 @@ class HUDOverlay(QWidget):
|
||||||
|
|
||||||
layout.addWidget(summary_frame)
|
layout.addWidget(summary_frame)
|
||||||
|
|
||||||
|
# Separator before cost metrics
|
||||||
|
if self.hud_config.show_total_cost and self.hud_config.show_cost_metrics:
|
||||||
|
sep2 = QFrame()
|
||||||
|
sep2.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep2.setStyleSheet("background-color: rgba(255, 255, 255, 30);")
|
||||||
|
sep2.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep2)
|
||||||
|
|
||||||
# === COST METRICS (if enabled) ===
|
# === COST METRICS (if enabled) ===
|
||||||
if self.hud_config.show_cost_metrics:
|
if self.hud_config.show_cost_metrics:
|
||||||
metrics_frame = QFrame()
|
metrics_box = QFrame()
|
||||||
metrics_frame.setStyleSheet("background-color: rgba(0, 0, 0, 100); border-radius: 4px;")
|
metrics_box.setStyleSheet("background-color: rgba(50, 50, 50, 100); border: 1px solid rgba(255, 255, 255, 30); border-radius: 4px;")
|
||||||
metrics_layout = QHBoxLayout(metrics_frame)
|
metrics_layout = QHBoxLayout(metrics_box)
|
||||||
metrics_layout.setContentsMargins(8, 4, 8, 4)
|
metrics_layout.setContentsMargins(8, 4, 8, 4)
|
||||||
|
|
||||||
self.cps_label = QLabel("Shot: 0.0000")
|
self.cps_label = QLabel("Shot: 0.0000")
|
||||||
|
|
@ -493,17 +503,26 @@ class HUDOverlay(QWidget):
|
||||||
self.cphl_label = QLabel("Heal: 0.0000")
|
self.cphl_label = QLabel("Heal: 0.0000")
|
||||||
|
|
||||||
for lbl in [self.cps_label, self.cph_label, self.cphl_label]:
|
for lbl in [self.cps_label, self.cph_label, self.cphl_label]:
|
||||||
lbl.setStyleSheet("font-size: 10px; color: #AAAAAA;")
|
lbl.setStyleSheet("font-size: 10px; color: #CCCCCC;")
|
||||||
metrics_layout.addWidget(lbl)
|
metrics_layout.addWidget(lbl)
|
||||||
|
|
||||||
metrics_layout.addStretch()
|
metrics_layout.addStretch()
|
||||||
layout.addWidget(metrics_frame)
|
layout.addWidget(metrics_box)
|
||||||
|
|
||||||
|
# Separator before cost breakdown
|
||||||
|
if self.hud_config.show_cost_breakdown and (self.hud_config.show_total_cost or self.hud_config.show_cost_metrics):
|
||||||
|
sep3 = QFrame()
|
||||||
|
sep3.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep3.setStyleSheet("background-color: rgba(255, 255, 255, 30);")
|
||||||
|
sep3.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep3)
|
||||||
|
|
||||||
# === OPTIONAL: Cost Breakdown ===
|
# === OPTIONAL: Cost Breakdown ===
|
||||||
if self.hud_config.show_cost_breakdown:
|
if self.hud_config.show_cost_breakdown:
|
||||||
breakdown_frame = QFrame()
|
breakdown_box = QFrame()
|
||||||
breakdown_layout = QFormLayout(breakdown_frame)
|
breakdown_box.setStyleSheet("background-color: rgba(255, 0, 0, 10); border: 1px solid rgba(255, 100, 100, 30); border-radius: 4px;")
|
||||||
breakdown_layout.setContentsMargins(0, 0, 0, 0)
|
breakdown_layout = QFormLayout(breakdown_box)
|
||||||
|
breakdown_layout.setContentsMargins(6, 4, 6, 4)
|
||||||
breakdown_layout.setSpacing(2)
|
breakdown_layout.setSpacing(2)
|
||||||
|
|
||||||
self.wep_cost_label = QLabel("0.00")
|
self.wep_cost_label = QLabel("0.00")
|
||||||
|
|
@ -514,13 +533,22 @@ class HUDOverlay(QWidget):
|
||||||
breakdown_layout.addRow("Armor:", self.arm_cost_label)
|
breakdown_layout.addRow("Armor:", self.arm_cost_label)
|
||||||
breakdown_layout.addRow("Healing:", self.heal_cost_label)
|
breakdown_layout.addRow("Healing:", self.heal_cost_label)
|
||||||
|
|
||||||
layout.addWidget(breakdown_frame)
|
layout.addWidget(breakdown_box)
|
||||||
|
|
||||||
|
# Separator before combat stats
|
||||||
|
if self.hud_config.show_combat_stats and (self.hud_config.show_cost_breakdown or self.hud_config.show_total_cost):
|
||||||
|
sep4 = QFrame()
|
||||||
|
sep4.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep4.setStyleSheet("background-color: rgba(255, 255, 255, 30);")
|
||||||
|
sep4.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep4)
|
||||||
|
|
||||||
# === OPTIONAL: Combat Stats ===
|
# === OPTIONAL: Combat Stats ===
|
||||||
if self.hud_config.show_combat_stats:
|
if self.hud_config.show_combat_stats:
|
||||||
combat_frame = QFrame()
|
combat_box = QFrame()
|
||||||
combat_layout = QHBoxLayout(combat_frame)
|
combat_box.setStyleSheet("background-color: rgba(0, 100, 0, 30); border: 1px solid rgba(100, 255, 100, 30); border-radius: 4px;")
|
||||||
combat_layout.setContentsMargins(0, 0, 0, 0)
|
combat_layout = QHBoxLayout(combat_box)
|
||||||
|
combat_layout.setContentsMargins(6, 4, 6, 4)
|
||||||
|
|
||||||
self.kills_label = QLabel("Kills: 0")
|
self.kills_label = QLabel("Kills: 0")
|
||||||
self.globals_label = QLabel("Globals: 0")
|
self.globals_label = QLabel("Globals: 0")
|
||||||
|
|
@ -529,12 +557,38 @@ class HUDOverlay(QWidget):
|
||||||
combat_layout.addStretch()
|
combat_layout.addStretch()
|
||||||
combat_layout.addWidget(self.globals_label)
|
combat_layout.addWidget(self.globals_label)
|
||||||
|
|
||||||
layout.addWidget(combat_frame)
|
layout.addWidget(combat_box)
|
||||||
|
|
||||||
|
# Separator before damage stats
|
||||||
|
if self.hud_config.show_damage_stats and self.hud_config.show_combat_stats:
|
||||||
|
sep5 = QFrame()
|
||||||
|
sep5.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep5.setStyleSheet("background-color: rgba(255, 255, 255, 30);")
|
||||||
|
sep5.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep5)
|
||||||
|
|
||||||
# === OPTIONAL: Damage Stats ===
|
# === OPTIONAL: Damage Stats ===
|
||||||
if self.hud_config.show_damage_stats:
|
if self.hud_config.show_damage_stats:
|
||||||
damage_frame = QFrame()
|
damage_box = QFrame()
|
||||||
damage_layout = QHBoxLayout(damage_frame)
|
damage_box.setStyleSheet("background-color: rgba(100, 0, 0, 30); border: 1px solid rgba(255, 100, 100, 30); border-radius: 4px;")
|
||||||
|
damage_layout = QHBoxLayout(damage_box)
|
||||||
|
damage_layout.setContentsMargins(6, 4, 6, 4)
|
||||||
|
|
||||||
|
self.damage_dealt_label = QLabel("Dealt: 0")
|
||||||
|
self.damage_taken_label = QLabel("Taken: 0")
|
||||||
|
|
||||||
|
damage_layout.addWidget(self.damage_dealt_label)
|
||||||
|
damage_layout.addStretch()
|
||||||
|
damage_layout.addWidget(self.damage_taken_label)
|
||||||
|
|
||||||
|
layout.addWidget(damage_box)
|
||||||
|
|
||||||
|
# Separator before footer
|
||||||
|
sep_footer = QFrame()
|
||||||
|
sep_footer.setFrameShape(QFrame.Shape.HLine)
|
||||||
|
sep_footer.setStyleSheet("background-color: rgba(255, 215, 0, 50);")
|
||||||
|
sep_footer.setFixedHeight(1)
|
||||||
|
layout.addWidget(sep_footer)
|
||||||
damage_layout.setContentsMargins(0, 0, 0, 0)
|
damage_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
|
||||||
self.damage_dealt_label = QLabel("Dealt: 0")
|
self.damage_dealt_label = QLabel("Dealt: 0")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue