From 0f555b1a3abc2a99600eb164965291372fd425f3 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Sun, 8 Feb 2026 21:24:49 +0000 Subject: [PATCH] fix(gui): wire up Loadout Manager and real HUD overlay - Add Tools menu with Loadout Manager (Ctrl+L) - Replace placeholder HUD with real HUDOverlay from hud_overlay.py - Add on_loadout_manager() method --- memory/2026-02-08-evening.md | 42 ++++++++++++++++++++++++++++++++++++ ui/main_window.py | 38 ++++++++++++++------------------ 2 files changed, 58 insertions(+), 22 deletions(-) create mode 100644 memory/2026-02-08-evening.md diff --git a/memory/2026-02-08-evening.md b/memory/2026-02-08-evening.md new file mode 100644 index 0000000..945de53 --- /dev/null +++ b/memory/2026-02-08-evening.md @@ -0,0 +1,42 @@ +# 2026-02-08 Evening Session - Phase 2 Complete + +## 🎉 MILESTONE: All Tests Passing + +**Time:** 21:17 UTC +**Commit:** `43a43e2` +**Status:** ✅ 42/42 tests passing + +### What Was Fixed +1. **SimpleCache typo** — `_timestamps` → `self._timestamps` +2. **MOCK_TOOLS key typo** — `" Ziplex Z1"` → `"ziplex_z1"` +3. **DPP calculation bug** — formula was dividing by PED instead of PEC (100x error) +4. **DPP test expectation** — updated to match correct formula + +### Current Test Results +``` +42 passed in 0.34s +- 5 WeaponStats tests ✓ +- 4 ArmorStats tests ✓ +- 3 ToolStats tests ✓ +- 5 SimpleCache tests ✓ +- 12 EntropiaNexusAPI mock tests ✓ +- 9 MockData tests ✓ +- 2 Utility function tests ✓ +- 2 Integration tests ✓ +``` + +### Next Steps +1. **Run `python main.py`** — test full GUI +2. **Verify HUD overlay** — check click-through + draggable +3. **Test loadout manager** — DPP calculator, gear configs +4. **Live hunt test** — real Entropia session with HUD + +### Sprint 2 Status +| Phase | Status | +|-------|--------| +| Phase 1: GUI Foundation | ✅ Complete | +| Phase 2: Integration | ✅ Complete (tests passing) | +| Phase 3: Advanced Analytics | ⏳ Pending | + +--- +**Never-Break Rule followed:** pytest before ANY gameplay ✅ \ No newline at end of file diff --git a/ui/main_window.py b/ui/main_window.py index 06933f0..fed851d 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -59,30 +59,10 @@ class LogEvent: # ============================================================================ -# HUD Overlay (Placeholder for integration) +# HUD Overlay # ============================================================================ -class HUDOverlay: - """ - HUD Overlay controller placeholder. - This will be replaced with the actual HUD implementation. - """ - def __init__(self): - self.visible = False - - def show(self): - """Show the HUD overlay.""" - self.visible = True - print("[HUD] Overlay shown") - - def hide(self): - """Hide the HUD overlay.""" - self.visible = False - print("[HUD] Overlay hidden") - - def is_visible(self) -> bool: - """Check if HUD is visible.""" - return self.visible +from ui.hud_overlay import HUDOverlay # ============================================================================ @@ -583,6 +563,14 @@ class MainWindow(QMainWindow): settings_action.triggered.connect(self.on_settings) view_menu.addAction(settings_action) + # Tools menu + tools_menu = menubar.addMenu("&Tools") + + loadout_action = QAction("&Loadout Manager", self) + loadout_action.setShortcut("Ctrl+L") + loadout_action.triggered.connect(self.on_loadout_manager) + tools_menu.addAction(loadout_action) + # Help menu help_menu = menubar.addMenu("&Help") @@ -1080,6 +1068,12 @@ class MainWindow(QMainWindow): dialog = SettingsDialog(self) dialog.exec() + def on_loadout_manager(self): + """Open Loadout Manager dialog.""" + from ui.loadout_manager import LoadoutManagerDialog + dialog = LoadoutManagerDialog(self) + dialog.exec() + def on_about(self): """Show about dialog.""" QMessageBox.about(