Commit Graph

152 Commits

Author SHA1 Message Date
LemonNexus 7be9e1d763 fix: Refresh widgets tab dynamically when switching to it
ISSUE: Widgets tab was built once at startup. If a plugin was installed
after the app started, the widget wouldn't show up until restart.

FIX:
1. Added _refresh_widgets_tab() method that rebuilds the tab content
2. Called _refresh_widgets_tab() when switching to Widgets tab
3. Added debug logging to show registered widgets count
4. Lists all found widgets in console for debugging

Now when you:
1. Install Clock Widget plugin
2. Click on 🎨 Widgets tab
3. The tab refreshes and shows the Clock Widget

The widget appears immediately without needing to restart!
2026-02-15 16:20:39 +00:00
LemonNexus d73020db99 fix: Remove activateWindow() call to fix focus warning
Widgets have Qt::WindowDoesNotAcceptFocus flag set so they don't
steal focus from the game. Calling activateWindow() on them
produces a warning.

Removed activateWindow() call since:
1. Widgets should not accept focus (they're overlays)
2. raise_() is sufficient to bring them to front
3. WindowDoesNotAcceptFocus is intentional for game overlay widgets
2026-02-15 16:19:00 +00:00
LemonNexus 84b73298e8 cleanup: Remove ClockWidget and SystemMonitorWidget from core
These example widgets are now provided by plugins.
Core widget_system.py now only contains BaseWidget class.
2026-02-15 16:18:02 +00:00
LemonNexus defb83d213 feat: Widget Registry - plugins register widgets dynamically 2026-02-15 16:16:07 +00:00
LemonNexus 3ee405475f fix: Fix widget not appearing - store reference and set proper position
ISSUE: Clock and System Monitor widgets were created but not visible.
The widgets were being garbage collected because they weren't stored.

FIX:
1. Store widget in self._active_widgets list to prevent GC
2. Set parent=self to keep widget alive with overlay
3. Position widget at center of screen (visible location)
4. Call raise_() and activateWindow() to bring to front
5. Added debug output showing widget position

WIDGET CREATION NOW:
- Creates widget with parent
- Positions at center of screen
- Shows, raises, activates
- Stores reference in list
- Prints position for debugging
2026-02-15 16:10:12 +00:00
LemonNexus 71a205bc18 fix: Add content to plugins/__init__.py to properly expose base_plugin 2026-02-15 16:07:17 +00:00
LemonNexus 7a3aa9b7f1 fix: Fix plugin import path for installed plugins
The issue was that installed plugins (calculator, clock_widget, etc.)
could not import 'plugins.base_plugin' because the plugins package
wasn't properly in Python's module path when loading via
spec_from_file_location.

FIX:
1. Added project root to sys.path so 'plugins' package is findable
2. Added _ensure_plugins_package() method to preload plugins module
3. Modified discover_plugins() to try normal import first
4. Added proper error logging with traceback for debugging

This ensures installed plugins can properly import BasePlugin
from plugins.base_plugin as expected.
2026-02-15 16:06:45 +00:00
LemonNexus 2dd9392694 fix: Add plugins/base_plugin.py shim for installed plugins
Installed plugins (calculator, clock_widget, etc.) import from
plugins.base_plugin, but we moved BasePlugin to core.base_plugin.

This shim re-exports BasePlugin so installed plugins work without
needing to know about core module structure.

FIX:
- plugins/base_plugin.py now re-exports from core.base_plugin
- Installed plugins can continue using: from plugins.base_plugin import BasePlugin

This maintains backward compatibility for all installable plugins.
2026-02-15 16:04:01 +00:00
LemonNexus ab506cf7fa feat: Add top navigation tabs - Plugins | Widgets | Settings
NEW UI LAYOUT:
- Added tab bar at top of content area with 3 tabs:
  * 🔌 Plugins - Shows plugin list from sidebar + plugin content
  * 🎨 Widgets - Widget gallery to add overlay widgets
  * ⚙️ Settings - All settings in one place

WIDGETS TAB FEATURES:
- Built-in widgets section with Clock and System Monitor
- Each widget has Add button to create overlay
- Plugin widgets section (placeholder for plugin-added widgets)
- Descriptions for each widget type

SETTINGS TAB FEATURES:
- Moved settings from dialog into dedicated tab
- Sub-tabs: Plugins, Plugin Store, Hotkeys, Appearance, About
- Removed Settings button from header (now in tabs)

CHANGES:
- _create_content_area() replaced with _create_content_area_with_tabs()
- Added _switch_tab() method
- Added _create_plugins_tab(), _create_widgets_tab(), _create_settings_tab()
- Added _create_widget_button() helper
- Added _add_clock_widget() and _add_system_monitor_widget()
- Removed Settings button from header bar
- Removed old _open_settings() dialog approach

The UI is now organized with clear navigation between
plugins, widgets, and settings via top tabs.
2026-02-15 15:01:20 +00:00
LemonNexus a81e5caf64 fix: Built-in Plugin Store, dependency dialog, removed settings/plugin_store plugins
CHANGES:
1. Fixed plugin download to use raw git files instead of git clone
   - Avoids Windows permission issues with .git/objects
   - Downloads __init__.py and plugin.py directly

2. Added clickable dependencies button showing full dependency dialog
   - Shows Core Services Required
   - Shows Plugins Required
   - Lists what will be auto-installed

3. Integrated Plugin Store into Settings dialog
   - Added 🔌 Store tab to Settings
   - Plugin Store is now built-in, not a plugin

4. Removed plugins/settings/ and plugins/plugin_store_ui/
   - Settings is now built into overlay_window.py
   - Users access via Settings button

5. Added _create_plugin_store_tab() method to OverlayWindow

NOTE: Pull latest EU-Utility-Plugins-Repo to get Clock Widget
2026-02-15 02:56:14 +00:00
LemonNexus c18a90481a fix: Move base_plugin.py to core module and update imports
The base_plugin.py was removed from plugins/ folder during cleanup
but is still needed by core/plugin_manager.py and built-in plugins.

CHANGES:
- Restored base_plugin.py from plugin repo to core/base_plugin.py
- Updated imports in core/plugin_manager.py
- Updated imports in core/plugin_manager_optimized.py
- Updated imports in plugins/settings/plugin.py
- Updated imports in plugins/plugin_store_ui/plugin.py

This fixes ModuleNotFoundError when starting EU-Utility.
2026-02-15 02:44:50 +00:00
LemonNexus b9611d6965 feat: Rainmeter-style Widget System - draggable, resizable overlay widgets for plugins 2026-02-15 02:35:00 +00:00
LemonNexus fe7b4c9d94 feat: Core framework components - Settings, Dashboard, Search, Updater, Backup
BUILT-IN FRAMEWORK COMPONENTS (not plugins):

1. core/ui/settings_view.py
   - Settings interface with 6 tabs:
     * General (appearance, behavior)
     * Plugin Store (browse/install)
     * My Plugins (enable/disable)
     * Hotkeys (dynamic from plugins)
     * Data & Backup (import/export)
     * Updates (auto-updater settings)

2. core/ui/dashboard_view.py
   - Built-in dashboard with plugin hooks
   - Welcome widget
   - Quick stats
   - Plugin widget registration API
   - Grid layout for widgets

3. core/ui/search_view.py
   - Universal search interface
   - Plugin search provider registration
   - Debounced search
   - Quick access (Ctrl+Shift+F)

4. core/updater.py
   - Auto-updater (disabled by default)
   - Core and plugin update checking
   - Notification-only mode
   - Manual check button

5. core/backup.py
   - Backup manager for import/export
   - Full data backup/restore
   - ZIP-based format
   - Pre-operation backups

6. core/dependency_helper.py
   - Dependency checking
   - Missing package detection
   - Install helper
   - Troubleshooting dialog

7. core/ui/__init__.py
   - Module exports

REMOVED FROM plugins/:
- settings/ (now in core/ui)
- plugin_store_ui/ (now in core)
- dashboard/ (now in core/ui)
- universal_search/ (now in core/ui)
- import_export/ (now in core/backup.py)
- auto_updater/ (now in core/updater.py)

PLUGIN REPO UPDATED:
- Removed 6 plugins now built-in
- 17 optional plugins remain

Architecture now matches the vision:
- Core = Framework + Essential UI
- Plugins = Optional functionality
- Plugin Store = Distribution mechanism
2026-02-15 02:09:20 +00:00
LemonNexus 7d13dd1a29 cleanup: Remove all plugins moved to separate repository
All user-facing plugins have been moved to:
https://git.lemonlink.eu/impulsivefps/EU-Utility-Plugins-Repo

REMOVED FROM CORE (30+ plugins):
- analytics, auction_tracker, auto_screenshot, auto_updater
- calculator, chat_logger, codex_tracker, crafting_calc
- dashboard, discord_presence, dpp_calculator, enhancer_calc
- event_bus_example, game_reader, game_reader_test, global_tracker
- import_export, inventory_manager, log_parser_test, loot_tracker
- mining_helper, mission_tracker, nexus_search, price_alerts
- profession_scanner, session_exporter, skill_scanner
- spotify_controller, tp_runner, universal_search

ALSO REMOVED:
- plugins/base_plugin.py (was duplicate, should be in package root)
- plugins/__pycache__ (shouldn't be in git)

REMAINING IN CORE:
- plugins/__init__.py
- plugins/settings/ (essential for configuration)
- plugins/plugin_store_ui/ (essential for plugin installation)

EU-Utility is now a pure framework. Users install plugins via
Settings → Plugin Store or manually to the plugins/ folder.

This separation enables:
- Independent plugin development
- Modular installation (only what you need)
- Community contributions via plugin repo
- Cleaner core codebase focused on framework
2026-02-15 01:53:09 +00:00
LemonNexus 725590e247 feat: Plugin Store - Framework-only architecture
BREAKING CHANGE: EU-Utility is now a framework-only application.
All user-facing features have been moved to separate plugin repository.

NEW FEATURES:

1. Plugin Store Core Module (core/plugin_store.py)
   - PluginStoreWorker: Background operations (fetch, download, updates)
   - PluginStoreUI: Grid-based plugin browser with cards
   - PluginInfo dataclass for plugin metadata
   - Fetches from remote git repository

2. Plugin Store UI Features:
   - Grid layout with plugin cards (300x200px each)
   - Search/filter by name, description, tags
   - Category filter dropdown
   - Visual indicators:
     * 📦 Plugin icon (emoji-based)
     * Version badge
     * Status badges ( Enabled, 📦 Installed)
     * Tag display
     * 🔗 Dependency count with tooltip
   - Install/Enable/Disable/Uninstall buttons
   - Progress bar for operations
   - Refresh and Check Updates buttons

3. Settings Integration:
   - New 'Plugin Store' tab in Settings
   - Moved plugin management to 'My Plugins' tab
   - Plugin Store uses core module directly

4. Plugin Store UI Plugin (plugins/plugin_store_ui/):
   - Standalone plugin for overlay integration
   - Hotkey: Ctrl+Shift+P (configurable)

ARCHITECTURE CHANGES:

- EU-Utility Core: Framework only (PluginAPI, services, overlay)
- Plugin Repository: https://git.lemonlink.eu/impulsivefps/EU-Utility-Plugins-Repo
- Plugins installed via Store → user plugins/ directory
- Local plugins/ folder still supported for development

MANIFEST FORMAT:

USER WORKFLOW:
1. Open Settings → Plugin Store
2. Browse/search available plugins
3. Click Install (with dependency confirmation)
4. Restart EU-Utility
5. Enable plugin in 'My Plugins' tab

DEVELOPER WORKFLOW:
1. Develop plugin locally in plugins/
2. Test with core framework
3. Submit to plugin repository
4. Users install via Store

This enables limitless modularity - users only install
what they need, developers can publish independently.
2026-02-15 01:43:25 +00:00
LemonNexus 09ad30c223 feat: Dynamic hotkey discovery from plugins
REFACTOR: Hotkeys are no longer hardcoded in Settings UI

NEW SYSTEM:

1. Plugins advertise their hotkeys via class attributes:

   Legacy (single hotkey):
     hotkey = 'ctrl+shift+s'

   New format (multiple hotkeys with descriptions):
     hotkeys = [
         {
             'action': 'toggle',
             'description': 'Toggle Skill Scanner',
             'default': 'ctrl+shift+s',
             'config_key': 'skillscanner_toggle'  # optional
         },
         {
             'action': 'quick_scan',
             'description': 'Quick Scan',
             'default': 'f12',
         }
     ]

2. Settings UI dynamically discovers hotkeys:
   - Scans all plugins for hotkey/hotkeys attributes
   - Groups hotkeys by plugin name
   - Shows description + input field + reset button
   - Core system hotkeys in separate 'Core System' group

3. Visual improvements:
   - Scrollable hotkey list
   - Reset button (↺) for each hotkey
   - Tooltips showing default value
   - Plugin grouping for organization

4. Backward compatible:
   - Still supports legacy 'hotkey' attribute
   - Converts to new format automatically
   - Existing settings preserved

BASE PLUGIN:
- Added hotkeys attribute documentation
- Added docstring with usage examples
- Shows both formats in class docstring

SETTINGS PLUGIN:
- _create_hotkeys_tab() now dynamic
- _collect_plugin_hotkeys() scans all plugins
- Groups by plugin with QGroupBox
- Reset buttons restore defaults
- ScrollArea for long lists

This allows plugins to define multiple hotkeys with
descriptions, and they'll automatically appear in
Settings without hardcoding them in the core.
2026-02-15 01:28:21 +00:00
LemonNexus b63763b528 feat: Enhanced Plugin Management UI with Dependency Visualization
NEW FEATURES:

1. Dependency Indicators:
   - 🔗 (cyan) - Plugin has dependencies (hover for list)
   - ⚠️ (yellow) - Plugin is required by other enabled plugins
   - 🔄 (orange) - Auto-enabled due to dependency

2. Legend Bar:
   Shows what each indicator means at the top of the plugins tab

3. Dependency Tooltips:
   - 🔗 Shows: 'This plugin requires: X, Y, Z. These will be auto-enabled.'
   - ⚠️ Shows: 'Required by enabled plugins: A, B. Disable those first.'
   - 🔄 Shows: 'Auto-enabled by: PluginName'

4. Enable with Dependencies:
   When enabling a plugin with unmet dependencies:
   - Shows confirmation dialog listing all plugins to be enabled
   - User can cancel before enabling
   - Dependencies are auto-enabled on confirmation

5. Disable Protection:
   When trying to disable a plugin that others depend on:
   - Shows warning dialog listing dependent plugins
   - Prevents accidental breaking of dependencies
   - User must disable dependents first

6. Dependency Report Dialog:
   - New '📋 Dependency Report' button
   - Shows HTML report with:
     * Summary stats (total/enabled plugins)
     * Plugins with dependencies list
     * Plugins required by others list
     * Full dependency chains

7. Enable/Disable All with Ordering:
   - Dependencies are enabled first (topological sort)
   - Dependents are disabled first (reverse order)
   - Prevents enable/disable failures due to ordering

8. Auto-refresh UI:
   After enabling/disabling, plugin list refreshes to show:
   - Updated auto-enabled status
   - Updated dependency indicators
   - Updated checkbox states

VISUAL IMPROVEMENTS:
- Better spacing and layout
- Color-coded indicators
- Clear visual hierarchy
- Informative tooltips throughout

This makes plugin management much more intuitive and prevents
common mistakes like accidentally breaking dependencies.
2026-02-15 01:25:49 +00:00
LemonNexus 194cda2c62 fix: Improve text filtering and add validation to skill parsing
PROBLEM: UI text like 'Position Skills window Wounding' and
'Scan Current Page Serendipity' was being parsed as skills.

FIXES:

1. Enhanced is_valid_skill_text() filtering:
   - Added more UI patterns: 'Position Skills', 'Scan Current Page',
     'Select Area', 'Drag over', 'Navigate pages'
   - Added combined patterns: 'Combat Wounding', 'Scan Serendipity',
     'Position Wounding', etc.
   - Added action word detection: Click, Scan, Position, Select,
     Navigate, Start, Save, Clear - any line with these is UI text
   - Reduced max words from 10 to 7 for skill names

2. Added validation in _parse_skills_from_text():
   - After extracting skill name, validates with is_valid_skill_text()
   - Logs filtered names for debugging
   - Only adds to results if validation passes

USER ACTION NEEDED:
- Pull latest code: git pull origin main
- Select Area button should appear in UI
- Drag to select your Skills window area
- Scan will only read from that area

This should eliminate UI text from scan results.
2026-02-15 01:22:40 +00:00
LemonNexus 67106ae64e feat: Add Snipping Tool-style area selection to Skill Scanner
NEW FEATURE - Snipping Tool Area Selection:

WORKFLOW:
1. Click 'Select Area' button in Skill Scanner
2. Screen dims with semi-transparent overlay
3. Drag to draw rectangle over your Skills window
4. Release to confirm (right-click or Escape to cancel)
5. Selected area is saved for all future scans
6. Click 'Start Smart Scan' to begin

SNIPPING WIDGET FEATURES:
- Fullscreen overlay with darkened background
- Drag to draw selection rectangle
- White border around selection
- Dimensions displayed (e.g., '800 x 600')
- Right-click to cancel
- Escape key to cancel
- Minimum 50x50 pixels required

UI UPDATES:
- Added 'Select Area' button with blue color (#4a9eff)
- Area label shows current selection: '800x600 at (100, 200)'
- All mode instructions updated to mention Select Area step

TECHNICAL:
- SnippingWidget inherits from QWidget
- Uses Qt.TranslucentBackground for transparency
- QPainter.CompositionMode_Clear for cutout effect
- Selected area stored as self.scan_area (x, y, w, h)
- SkillOCRThread accepts scan_area parameter
- Both single scan and multi-page scan use selected area

BENEFITS:
- No more window detection errors
- User has full control over scan region
- Works regardless of window title or process name
- Precise selection of Skills window area

If no area selected, falls back to full game window capture.
2026-02-15 01:20:54 +00:00
LemonNexus 4d9699c1a3 fix: Add missing QObject import to skill_scanner
BUG: name 'QObject' is not defined

CAUSE: SignalHelper class uses QObject but it wasn't imported.

FIX: Added QObject to PyQt6.QtCore imports.
2026-02-15 01:09:02 +00:00
LemonNexus 426f0a2ad3 fix: QObject signals issue - BasePlugin doesn't inherit from QObject
BUG: SkillScannerPlugin cannot be converted to PyQt6.QtCore.QObject

CAUSE: BasePlugin inherits from ABC, not QObject. Qt signals (pyqtSignal)
must be defined in a QObject subclass.

FIX:
1. Created SignalHelper(QObject) class to hold all signals:
   - hotkey_triggered
   - update_status_signal
   - update_session_table_signal
   - update_counters_signal
   - enable_scan_button_signal

2. In SkillScannerPlugin.initialize():
   - Create self._signals = SignalHelper()
   - Connect signals from self._signals (not self)

3. In get_ui():
   - Connect enable_scan_button_signal after scan_page_btn is created

4. Updated all signal emits to use self._signals.emit()

This allows the plugin to use Qt signals for thread-safe UI updates
without requiring BasePlugin to inherit from QObject (which would
break other plugins).
2026-02-15 01:01:31 +00:00
LemonNexus 0155eb0be0 feat: Constrain skill scanner to only Entropia game window
BUG: OCR was reading text from Discord, EU-Utility UI, and other windows.

FIX:
1. Added find_entropia_window() - Uses win32gui + psutil on Windows to find
   the game window by process name 'Entropia.exe' and window title containing
   'Entropia Universe'. Returns (left, top, width, height).

2. Added capture_entropia_region() - Captures only the game window region,
   falls back to full screen if window not found.

3. Added is_valid_skill_text() - Filters out non-game text patterns:
   - Discord, Event Bus, Game Reader, Test, Page Scanner, HOTKEY MODE
   - UI elements like 'Skill Tracker', 'Calculator', 'Nexus Search'
   - Debug text like '[SkillScanner]', 'Parsed:', 'Cleared'
   - Process names like 'Entropia.exe', 'Client (64 bit)', 'Arkadia'
   - Lines with >10 words (skills aren't that long)

4. Added recognize_image() method to OCRService for convenience.

5. Modified SkillOCRThread.run() to:
   - Capture only Entropia window
   - Filter text before parsing
   - Use _parse_skills_filtered() which validates each line

6. Added _parse_skills_filtered() method that:
   - Splits text by lines
   - Only keeps lines containing a valid rank
   - Validates each line with is_valid_skill_text()
   - Logs filtered lines for debugging

RESULT:
- Scanner now ONLY reads from the game window
- Invalid text (Discord, UI, debug) is filtered out
- Much cleaner skill parsing results

Note: Window title varies by location (e.g., '[Arkadia]', '[Calypso]')
but process name is always 'Entropia.exe'.
2026-02-15 00:55:37 +00:00
LemonNexus 05f8c06312 fix: Replace all invokeMethod calls with Qt signals for thread-safety
BUG: QMetaObject.invokeMethod with Q_ARG doesn't work properly in PyQt6
and was causing TypeError exceptions.

FIX:
- Added proper Qt signals at class level:
  * update_status_signal(str, bool, bool)
  * update_session_table_signal(object)
  * update_counters_signal()
  * enable_scan_button_signal(bool)

- Connected all signals to slot methods in initialize()
- Replaced all invokeMethod calls with signal.emit()
- Thread callbacks now emit signals instead of calling invokeMethod
- UI updates happen in main Qt thread via signal/slot mechanism

This is the correct PyQt6 way to do cross-thread communication.
All UI updates are now thread-safe and won't cause TypeErrors.
2026-02-15 00:51:15 +00:00
LemonNexus d0ccb791f7 fix: Fix hotkey thread-safety issue in Skill Scanner
BUG: TypeError when using F12 hotkey - invokeMethod syntax was wrong
for PyQt6.

FIX:
1. Added hotkey_triggered = pyqtSignal() at class level
2. Connected signal to _scan_page_for_multi in initialize()
3. _hotkey_scan() now just emits the signal (thread-safe)
4. Signal ensures scan runs on main Qt thread

This is the proper Qt way to handle cross-thread communication.
The hotkey callback runs in keyboard library's thread, but the
scan must run in Qt's main thread to update UI safely.
2026-02-15 00:47:10 +00:00
LemonNexus e132a80f2b feat: Add Smart Auto-Scan with Hotkey Fallback to Skill Scanner
NEW FEATURE - Smart Multi-Page Scanning:

MODES:
1. 🤖 Smart Auto + Hotkey Fallback (default)
   - Tries to auto-detect page changes
   - Monitors page number area (1/12, 2/12, etc.)
   - If detection fails, falls back to F12 hotkey
   - User gets notified: 'Auto-detect unreliable. Use F12!'

2. ⌨️ Manual Hotkey Only
   - User navigates pages in EU
   - Presses F12 to scan each page
   - Simple and 100% reliable

3. 🖱️ Manual Click Only
   - Original click-based scanning
   - Click button, wait for beep, next page

SMART AUTO FEATURES:
- Checks page number area every 500ms
- Detects when page number changes (1→2, 2→3, etc.)
- Automatically triggers scan on page change
- Tracks failures - after 10 failures, falls back to hotkey
- Plays beep sound on successful auto-scan

HOTKEY FEATURES:
- F12 key registered globally
- Works even when EU-Utility not focused
- Triggers scan immediately
- Can be used as primary mode or fallback

UI UPDATES:
- Mode selector dropdown
- Dynamic instructions based on mode
- Hotkey info displayed (F12 = Scan)
- Status shows when auto-detect vs hotkey is active

TECHNICAL:
- Uses keyboard library for global hotkeys
- QTimer for auto-detection polling
- Tesseract OCR for page number reading
- Graceful fallback when auto fails

This gives users the best of both worlds:
- Try auto for convenience
- Fallback to hotkey for reliability
2026-02-15 00:42:37 +00:00
LemonNexus 482ec9aea4 feat: Add Multi-Page Scanner to Skill Scanner plugin
NEW FEATURE - Multi-Page Scanner:

WORKFLOW:
1. User positions Skills window to show skills
2. User clicks 'Scan Current Page'
3. App scans, shows checkmark , plays BEEP sound
4. Status shows: 'Page X scanned! Click Next Page in game →'
5. User manually clicks Next Page in EU
6. User clicks 'Scan Current Page' again
7. Repeat until all pages scanned
8. User clicks 'Save All' to store combined results

FEATURES:
-  Checkmark icon and green text on successful scan
- 🔊 Beep sound (Windows MessageBeep) to notify user
- 📊 Live counters: Pages scanned, Total skills
- 🗑 Clear Session button to start over
- 💾 Save All button merges session into main data
- 📝 Session table shows all skills collected so far

UI ELEMENTS:
- Instructions panel explaining the workflow
- Status label with color-coded feedback
- Pages: X counter
- Skills: X counter
- Three buttons: Scan Page, Save All, Clear Session
- Session table showing accumulated skills

TECHNICAL:
- current_scan_session dict accumulates skills across pages
- pages_scanned counter tracks progress
- Thread-safe UI updates via QMetaObject.invokeMethod
- Windows beep via winsound module (with fallback)

This gives users full control while guiding them through
multi-page scanning without any auto-clicking!
2026-02-15 00:35:50 +00:00
LemonNexus 46a76a91e8 fix: Parse ALL skills from window and clean category names
FIXES:
1. Changed from re.search (finds first) to re.finditer (finds ALL)
   - Now extracts all skills visible in the skills window
   - Not just the first skill

2. Added category name cleaning
   - Removes: Attributes, Combat, Design, Construction, etc.
   - Prevents 'Attributes Laser Weaponry Technology' issues
   - Now correctly extracts just 'Laser Weaponry Technology'

3. Normalizes whitespace after removing categories
   - Joins all text into single space-separated string
   - Helps with multi-line skill parsing

4. Added validation for skill name length
   - Must be more than 2 characters
   - Filters out false positives

ABOUT YOUR FEATURE REQUESTS:

Multi-Page Scanning:
- To scan all pages automatically would require:
  1. Detect the skills window is open
  2. Click the 'next page' button automatically
  3. Wait for page transition
  4. Repeat until last page (detect via page counter)
  5. This requires UI automation (pyautogui)
  6. Risk: Could interfere with gameplay

Progress Bar Detection:
- The green bars represent % progress to next level
- To measure them would require:
  1. Image processing (OpenCV) to detect bar length
  2. Comparing green pixels to total bar width
  3. Converting to percentage
  4. This is complex and computationally expensive
  5. Alternative: Track skill gains via chat.log instead

RECOMMENDATION:
For tracking skill progress precisely, the best approach is:
1. Use chat.log parsing (already implemented)
2. It catches every skill gain with exact values
3. No OCR needed - 100% accurate
4. Works in background automatically
2026-02-15 00:29:41 +00:00
LemonNexus 1538508b63 fix: Add Arch Master rank and Reset button to Skill Scanner
FIXES:
1. Added 'Arch Master' to the list of multi-word ranks
   - Multi-word ranks are now matched first to prevent partial matches
   - Changed rank matching order: ['Arch Master', 'Grand Master'] + single ranks
   - This fixes 'Laser Weaponry Technology Arch' being parsed incorrectly
   - Now correctly parses as: 'Laser Weaponry Technology', 'Arch Master', 8805

2. Added 'Reset Data' button to Skill Scanner plugin
   - Red button next to 'Scan Skills Window'
   - Shows confirmation dialog before clearing
   - Clears: skills_data, skill_gains, and the UI tables
   - Also clears the data file (skill_tracker.json)

3. Clean skill names by removing 'Skill' prefix
   - OCR sometimes reads 'Skill Laser Weaponry Technology'
   - Now strips 'Skill' or 'SKILL' prefix from skill names

4. Updated both Skill Scanner and Game Reader Test plugins
   - Both now use the same improved parsing logic
   - Both handle multi-word ranks correctly
2026-02-15 00:23:13 +00:00
LemonNexus bf42c2a1b7 fix: Add missing 'import re' to game_reader_test plugin
The _parse_skills_from_text method uses re (regex) but it was only
imported inside a nested function, not at module level.

Added 'import re' at the top of the file.
2026-02-15 00:18:54 +00:00
LemonNexus 419b0cb523 fix: Disable Spotify widget by default
The Spotify 'Now Playing' overlay widget was appearing even when
the Spotify Controller plugin was not enabled.

CHANGES:
- Set 'spotify' overlay widget to enabled: False in default settings
- Removed Spotify from dashboard default widgets
- Both settings.py and settings_secure.py updated

The widget can still be manually enabled by users who want it:
1. Edit config/settings.json
2. Set overlay_widgets.spotify.enabled to true
3. Or use the overlay widget controls

This fixes the issue where the Spotify widget appeared even when
the plugin wasn't enabled.
2026-02-15 00:14:35 +00:00
LemonNexus b0f3b0b00c feat: Add Skills Parser tab to Game Reader Test plugin
NEW FEATURES:

1. Skills Parser Tab:
   - Dedicated tab for parsing EU Skills window
   - Captures screen and extracts skills automatically
   - Shows results in a 3-column table (Skill Name, Rank, Points)
   - Displays raw OCR text for debugging
   - Shows count of parsed skills

2. Improved Skills Parsing:
   - Better pattern matching for skill names with spaces
   - Recognizes all EU skill ranks
   - Filters out headers and category names
   - Validates points are reasonable numbers

3. UI Improvements:
   - Clear instructions on how to use
   - Visual feedback during capture
   - Color-coded status (cyan = working, red = error)
   - Table auto-sizes columns

USAGE:
1. Open EU Skills window
2. Go to Game Reader Test → Skills Parser tab
3. Click 'Capture Skills Window'
4. View parsed skills in the table

This makes it much easier to test skill scanning and verify
that the OCR is parsing correctly!
2026-02-15 00:07:28 +00:00
LemonNexus a30bcbaba7 fix: Improve skill scanner parser for 3-column layout
The previous parser was too simple and couldn't handle the merged text
from OCR on the skills window.

IMPROVEMENTS:
1. Clean up common headers and category names from OCR text
2. Better regex pattern that handles merged text
3. Alternative parser as fallback for heavily merged text
4. Debug logging to show parsed skills
5. Validation to filter out bad matches

PARSING LOGIC:
- Finds pattern: SkillName Rank Points
- Handles multi-word skill names (e.g., 'Combat Reflexes')
- Recognizes all EU skill ranks (Newbie through Awesome)
- Validates points are reasonable numbers

This should correctly parse skills like:
  Aim Amazing 5524
  Combat Reflexes Incredible 5991
  Handgun Grand Master 8621
2026-02-15 00:05:05 +00:00
LemonNexus 8e49f4e45e fix: Add missing Path import to game_reader_test plugin
BUG: NameError: name 'Path' is not defined when browsing for image file.

The pathlib.Path import was missing. Added it to the imports section.
2026-02-14 23:55:02 +00:00
LemonNexus 88f112dfa2 fix: Fix invalid escape sequence warning in ocr_backend_manager.py
The string contained C:\Program Files\Tesseract-OCR which Python
interpreted as escape sequences (\P is invalid).

Fixed by escaping backslashes: C:\Program Files\Tesseract-OCR
2026-02-14 23:52:05 +00:00
LemonNexus f9dbde1a95 fix: Remove duplicate code causing indentation error in game_reader_test plugin
The _check_backends method had leftover code from an old version
mixed with the new implementation, causing:
  unexpected indent (plugin.py, line 953)

Removed the duplicate/old code block.
2026-02-14 23:50:24 +00:00
LemonNexus 0bdb3ce189 feat: Add plugin-to-plugin dependencies support
Plugins can now declare dependencies on other plugins.

NEW FEATURES:
- dependencies['plugins'] = ['plugin_id1', 'plugin_id2']
- Separates pip packages (auto-installed) from plugin dependencies (user enabled)
- Settings dialog shows which plugins need to be enabled first
- PluginDependencyCheck tracks installed/enabled status

EXAMPLE:
dependencies = {
    'pip': ['requests'],
    'plugins': ['plugins.dashboard.plugin.DashboardPlugin']
}
2026-02-14 23:49:13 +00:00
LemonNexus 706a5710a9 feat: Auto-install plugin dependencies when enabling plugins
NEW FEATURES:

1. Plugin Dependency Declaration (BasePlugin):
   - Added 'dependencies' class attribute
   - Format: {'pip': ['package1', 'package2'], 'optional': {...}}
   - Plugins can declare required pip packages

2. Plugin Dependency Manager (core/plugin_dependency_manager.py):
   - Checks if declared dependencies are installed
   - Installs missing packages via pip
   - Tracks installation status
   - Shows progress dialog during installation

3. Settings Dialog Integration:
   - When enabling a plugin with dependencies, shows dialog
   - Lists missing dependencies
   - Asks user if they want to install
   - Shows progress bar during installation
   - Handles installation failures gracefully

4. Example: Game Reader Test plugin:
   - Declares dependencies: pillow, numpy
   - Optional: easyocr, pytesseract, paddleocr
   - When enabled, prompts to install if missing

WORKFLOW:
1. User enables a plugin in Settings → Plugins
2. System checks if plugin has dependencies
3. If dependencies missing, shows dialog
4. User clicks Yes to install
5. Progress dialog shows installation progress
6. Plugin loads after dependencies installed

This eliminates manual pip install steps for plugins!
2026-02-14 23:46:01 +00:00
LemonNexus 6931c4b039 fix: Fix HTTPClient, Dashboard, and Log Parser errors
BUG FIXES:

1. HTTPClient '_generate_cache_key' AttributeError:
   - The method definition was missing, only had docstring and body
   - Added proper method signature: def _generate_cache_key(self, url, params)

2. Dashboard 'bg_dark' KeyError:
   - EU_COLORS doesn't have 'bg_dark'
   - Changed to 'bg_secondary' which is the correct color

3. Log Parser 'maximum recursion depth exceeded':
   - read_log() was calling itself instead of parent method
   - Changed to super().read_log() to call BasePlugin's method

These fixes resolve:
- Universal Search not working
- API errors
- Dashboard customize dialog crash
- Log Parser infinite recursion
2026-02-14 23:40:09 +00:00
LemonNexus 999bdfca35 feat: Fix OCR errors and add backend installation/management
BUG FIXES:
1. EasyOCR 'Invalid input type' error:
   - PIL Images must be converted to numpy arrays
   - Added np.array() conversion before passing to EasyOCR

2. PaddleOCR 'Unknown argument: show_log' error:
   - Some versions don't support show_log parameter
   - Added try/except to handle both versions
   - Falls back to creating PaddleOCR without show_log

NEW FEATURES:
1. OCR Backend Manager (core/ocr_backend_manager.py):
   - Detects installed OCR backends
   - Checks Windows Registry for Tesseract installation
   - Searches common installation paths
   - Auto-configures pytesseract with found binary

2. Calibration Tab Improvements:
   - Added 'Install EasyOCR' button (pip install easyocr)
   - Added 'Install Tesseract Package' button (pip install pytesseract)
   - Added 'Auto-Detect Tesseract' button (checks registry/paths)
   - Added 'Install PaddleOCR' button (pip install paddleocr)
   - Shows which backends are available and where they're installed

3. Better Error Messages:
   - Clear instructions when backends are missing
   - Direct links to download pages
   - Shows detected installation paths

The app now:
- Automatically finds Tesseract from registry
- Allows installing backends from within the UI
- Properly handles all OCR input formats
2026-02-14 23:38:18 +00:00
LemonNexus d7b7b491b5 docs: Add OCR requirements section to README and improve error handling
Added to README.md:
- New 'OCR Requirements (Optional)' section after Installation
- Instructions for installing EasyOCR (recommended), Tesseract, or PaddleOCR
- Note that Game Reader works without OCR, just shows 'not available'

Improved Game Reader Test plugin:
- Better error message when Tesseract binary is not installed
- Provides download link and installation steps in error message
- Updated Calibration tab to check if Tesseract binary is available
- Shows recommendation to use EasyOCR in backend status

This helps users understand why they get 'tesseract is not installed'
errors and how to fix them.
2026-02-14 20:27:31 +00:00
LemonNexus a80a9ccd06 feat: Add File Test tab to Game Reader Test plugin
Added new 'File Test' tab that allows testing OCR on saved screenshot files.
This is useful when:
- The game is not currently running
- You want to test OCR on a specific saved screenshot
- You want to compare OCR results on the same image

Features:
- Browse button to select image files (PNG, JPG, BMP, TIFF)
- Backend selection (Auto/EasyOCR/Tesseract)
- Displays filename and processing stats
- Shows which backend was used and processing time

The original 'Quick Test' still captures the current screen.
The new 'File Test' lets you test on saved images.
2026-02-14 20:07:47 +00:00
LemonNexus 345ec865e1 fix: Fix Log Parser Test plugin event field names
The plugin was using wrong field names for EventBus events:

SkillGainEvent:
- Fixed: points → gain_amount
- Fixed: new_value → skill_value

LootEvent:
- Fixed: Now uses items list instead of direct item_name/quantity/value
- Updated to handle the dict structure in items list

DamageEvent:
- Fixed: amount → damage_amount
- Fixed: Now uses is_outgoing instead of is_critical for direction
- Added target_name and attacker_name fields

GlobalEvent:
- Fixed: player → player_name
- Fixed: item → item_name
- Added achievement_type field

All simulate buttons should now work correctly.
2026-02-14 20:06:18 +00:00
LemonNexus 899b74fe62 fix: Remove redundant Settings plugin and baked-in Spotify widget
CHANGES:
1. Settings plugin is no longer categorized as 'Core' plugin
   - The settings menu is built into the overlay window
   - Having both was redundant
   - Settings plugin still exists but won't be auto-enabled

2. Removed hardcoded SpotifyWidget from core/dashboard.py
   - Spotify widget was baked into core instead of being a proper plugin
   - Should be in plugins/spotify_controller/ instead
   - Commented out the widget addition for now

This addresses the user's feedback that:
- Settings plugin is redundant with the settings menu
- Spotify widget shouldn't be in core
2026-02-14 19:58:18 +00:00
LemonNexus de63d8895a fix: Fix sidebar plugin switching and Dashboard border color
BUG 1: Sidebar buttons clicked wrong plugin
- Lambda captured idx by reference, always using last value
- Fixed by using functools.partial to capture by value

BUG 2: Dashboard plugin KeyError 'border_subtle'
- Changed to 'border_default' which exists in EU_COLORS

The sidebar should now correctly switch to the clicked plugin.
2026-02-14 19:53:51 +00:00
LemonNexus 539f07e713 fix: Fix lambda function argument errors in overlay_window.py
BUG: TypeError: missing 1 required positional argument: 'checked'

The lambda functions were expecting a 'checked' argument that wasn't
being passed by the signals:
- QShortcut.activated doesn't pass any arguments
- SidebarButton.clicked doesn't pass any arguments

Fix: Removed 'checked' parameter from both lambda functions.
2026-02-14 19:49:03 +00:00
LemonNexus e62419a9fd fix: Replace bg_panel with bg_secondary in Dashboard plugin
BUG: 'bg_panel' KeyError in Dashboard plugin.

The EU_COLORS dictionary doesn't have 'bg_panel'. Changed to use
'bg_secondary' which is the correct background color for panels.
2026-02-14 19:46:14 +00:00
LemonNexus 5fc8d85df5 fix: Replace border_color with border_default in overlay_window.py
BUG: KeyError: 'border_color' when opening Settings dialog.

The color dictionary uses 'border_default' not 'border_color'.
Fixed all 5 occurrences in the file.
2026-02-14 19:29:30 +00:00
LemonNexus 0d740c3621 fix: Replace accent_primary with accent_orange in overlay_window.py
BUG: KeyError: 'accent_primary' when opening Settings dialog.

The color dictionary uses 'accent_orange' not 'accent_primary'.
Fixed all 10 occurrences in the file.
2026-02-14 19:22:06 +00:00
LemonNexus 92e528b5b6 feat: Fix system tray and add configurable hotkeys
SYSTEM TRAY FIXES:
- Added fallback icon search paths
- Falls back to standard system icon if no custom icon found
- Better error handling for missing icon files
- System tray should now show in Windows taskbar

HOTKEY MANAGEMENT:
- New HotkeyManager class (core/hotkey_manager.py)
  - JSON-based configuration storage
  - 10 configurable global hotkeys
  - 2 local hotkeys
  - Validation for key combinations
  - Conflict detection
  - Reset to defaults

HOTKEYS TAB:
- Added 'Hotkeys' tab to Settings dialog
- Categorized by scope: Global/Local/Overlay
- Shows current key bindings
- Enable/disable toggles
- Visual styling with color-coded sections
- Reset to defaults button

DEFAULT HOTKEYS:
  Global:
  - Ctrl+Shift+U: Toggle overlay
  - Ctrl+Shift+H: Hide overlays
  - Ctrl+Shift+F: Universal search
  - Ctrl+Shift+N: Nexus search
  - Ctrl+Shift+C: Calculator
  - Ctrl+Shift+M: Spotify
  - Ctrl+Shift+R: Game reader (OCR)
  - Ctrl+Shift+S: Skill scanner
  - Ctrl+Shift+L: Loot tracker
  - Ctrl+Shift+P: Screenshot

  Local:
  - Ctrl+T: Toggle theme

  Overlay:
  - ESC: Close overlay
2026-02-14 19:17:42 +00:00
LemonNexus db0eb5bf65 feat: Redesign Plugins Settings tab with categorization
IMPROVED PLUGINS SETTINGS UI:

1. Visual Improvements:
   - Added header with plugin management info
   - Added color-coded legend (Core/Test/Other)
   - Styled plugin rows with hover effects
   - Version badges with orange accent color
   - Scrollable plugin list for large numbers
   - Better spacing and visual hierarchy

2. Plugin Categorization:
   - Core Plugins (teal): skill_scanner, loot_tracker, mining_helper,
     chat_logger, global_tracker, nexus_search, universal_search,
     calculator, settings, dashboard
   - Test Plugins (orange): game_reader_test, log_parser_test
   - Other Plugins (gray): All remaining plugins

3. Naming Convention:
   - Core plugins prefixed with 'Core-'
   - Test plugins prefixed with 'Test-'
   - Other plugins have no prefix

4. Technical Changes:
   - Added QScrollArea import
   - New _add_plugin_row() helper method
   - Grouped plugins by category
   - Styled checkboxes with EU theme
   - Added author attribution display
2026-02-14 19:14:22 +00:00