refactor: remove separate shrapnel display option
- Shrapnel is now integrated in the loot summary box (S: prefix) - Remove show_shrapnel config option - Remove shrapnel UI section from _setup_ui - Remove shrapnel checkbox from settings dialog - Update window size calculation - Keep shrapnel data in HUDStats for internal tracking
This commit is contained in:
parent
e356b037ac
commit
61c45fac8b
|
|
@ -46,7 +46,7 @@ class HUDConfig:
|
|||
show_combat_stats: bool = False # Kills, Globals, DPP
|
||||
show_damage_stats: bool = False # Damage dealt/taken
|
||||
show_cost_metrics: bool = True # Cost per shot/hit/heal
|
||||
show_shrapnel: bool = False
|
||||
show_shrapnel: bool = False # Deprecated - now integrated in loot summary
|
||||
show_gear_info: bool = True
|
||||
|
||||
compact_mode: bool = False
|
||||
|
|
@ -61,7 +61,6 @@ class HUDConfig:
|
|||
'show_combat_stats': self.show_combat_stats,
|
||||
'show_damage_stats': self.show_damage_stats,
|
||||
'show_cost_metrics': self.show_cost_metrics,
|
||||
'show_shrapnel': self.show_shrapnel,
|
||||
'show_gear_info': self.show_gear_info,
|
||||
'compact_mode': self.compact_mode,
|
||||
}
|
||||
|
|
@ -77,7 +76,6 @@ class HUDConfig:
|
|||
show_combat_stats=data.get('show_combat_stats', False),
|
||||
show_damage_stats=data.get('show_damage_stats', False),
|
||||
show_cost_metrics=data.get('show_cost_metrics', True),
|
||||
show_shrapnel=data.get('show_shrapnel', False),
|
||||
show_gear_info=data.get('show_gear_info', True),
|
||||
compact_mode=data.get('compact_mode', False),
|
||||
)
|
||||
|
|
@ -229,10 +227,6 @@ class HUDSettingsDialog(QDialog):
|
|||
self.cb_damage.setChecked(self.config.show_damage_stats)
|
||||
form.addRow(self.cb_damage)
|
||||
|
||||
self.cb_shrapnel = QCheckBox("Shrapnel Amount")
|
||||
self.cb_shrapnel.setChecked(self.config.show_shrapnel)
|
||||
form.addRow(self.cb_shrapnel)
|
||||
|
||||
# Display mode
|
||||
form.addRow(QLabel("<b>Display Mode</b>"))
|
||||
|
||||
|
|
@ -267,7 +261,6 @@ class HUDSettingsDialog(QDialog):
|
|||
self.config.show_cost_breakdown = self.cb_cost_breakdown.isChecked()
|
||||
self.config.show_combat_stats = self.cb_combat.isChecked()
|
||||
self.config.show_damage_stats = self.cb_damage.isChecked()
|
||||
self.config.show_shrapnel = self.cb_shrapnel.isChecked()
|
||||
self.config.compact_mode = self.cb_compact.isChecked()
|
||||
self.accept()
|
||||
|
||||
|
|
@ -589,28 +582,6 @@ class HUDOverlay(QWidget):
|
|||
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)
|
||||
|
||||
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_frame)
|
||||
|
||||
# === OPTIONAL: Shrapnel ===
|
||||
if self.hud_config.show_shrapnel:
|
||||
shrapnel_frame = QFrame()
|
||||
shrapnel_layout = QHBoxLayout(shrapnel_frame)
|
||||
shrapnel_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.shrapnel_label = QLabel("💎 Shrapnel: 0.00 PED")
|
||||
shrapnel_layout.addWidget(self.shrapnel_label)
|
||||
shrapnel_layout.addStretch()
|
||||
|
||||
layout.addWidget(shrapnel_frame)
|
||||
|
||||
# === FOOTER: Session Time + Drag Hint ===
|
||||
footer = QHBoxLayout()
|
||||
|
|
@ -668,8 +639,6 @@ class HUDOverlay(QWidget):
|
|||
height += 25
|
||||
if self.hud_config.show_damage_stats:
|
||||
height += 25
|
||||
if self.hud_config.show_shrapnel:
|
||||
height += 25
|
||||
if self.hud_config.show_session_time:
|
||||
height += 20
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue