feat: show both Cost and Loot together in summary row

- Change total cost display to show both Cost (red) and Loot (green) side by side
- Styled with background highlight for visibility
- Settings checkbox renamed to 'Cost & Loot Summary'
- Both values show PED amount
This commit is contained in:
LemonNexus 2026-02-09 22:53:42 +00:00
parent 61d2ad2019
commit 7a55e3b246
1 changed files with 22 additions and 14 deletions

View File

@ -184,7 +184,7 @@ class HUDSettingsDialog(QDialog):
self.cb_return.setChecked(self.config.show_return_pct)
form.addRow(self.cb_return)
self.cb_total_cost = QCheckBox("Total Cost")
self.cb_total_cost = QCheckBox("Cost & Loot Summary")
self.cb_total_cost.setChecked(self.config.show_total_cost)
form.addRow(self.cb_total_cost)
@ -414,18 +414,24 @@ class HUDOverlay(QWidget):
layout.addWidget(core_frame)
# === TOTAL COST (if enabled) ===
# === TOTAL COST + LOOT SUMMARY ===
if self.hud_config.show_total_cost:
total_cost_frame = QFrame()
total_cost_layout = QHBoxLayout(total_cost_frame)
total_cost_layout.setContentsMargins(0, 0, 0, 0)
summary_frame = QFrame()
summary_frame.setStyleSheet("background-color: rgba(0, 0, 0, 100); border-radius: 4px;")
summary_layout = QHBoxLayout(summary_frame)
summary_layout.setContentsMargins(8, 4, 8, 4)
self.total_cost_label = QLabel("Cost: 0.00 PED")
self.total_cost_label.setStyleSheet("font-size: 14px; color: #FFAAAA;")
total_cost_layout.addWidget(self.total_cost_label)
total_cost_layout.addStretch()
self.total_cost_label = QLabel("Cost: 0.00")
self.total_cost_label.setStyleSheet("font-size: 12px; color: #FFAAAA;")
layout.addWidget(total_cost_frame)
self.total_loot_label = QLabel("Loot: 0.00")
self.total_loot_label.setStyleSheet("font-size: 12px; color: #AAFFAA;")
summary_layout.addWidget(self.total_cost_label)
summary_layout.addStretch()
summary_layout.addWidget(self.total_loot_label)
layout.addWidget(summary_frame)
# === COST METRICS (if enabled) ===
if self.hud_config.show_cost_metrics:
@ -674,9 +680,11 @@ class HUDOverlay(QWidget):
self.return_label.setText(f"{ret:.1f}%")
self.return_label.setStyleSheet(f"font-size: 16px; font-weight: bold; color: {color};")
# Total Cost
# Total Cost + Loot
if hasattr(self, 'total_cost_label'):
self.total_cost_label.setText(f"Cost: {self._stats.cost_total:.2f} PED")
self.total_cost_label.setText(f"Cost: {self._stats.cost_total:.2f}")
if hasattr(self, 'total_loot_label'):
self.total_loot_label.setText(f"Loot: {self._stats.loot_total:.2f}")
# Cost metrics
if hasattr(self, 'cps_label'):