EU-Utility/core
LemonNexus 77e9f3d5f5 feat: GW2/Blish-style overlay system with multiple visibility modes
New OverlayController (core/overlay_controller.py):
- DESKTOP_APP: Activity bar only in desktop app
- OVERLAY_ALWAYS: Always visible as overlay
- OVERLAY_GAME_FOCUSED: Only when EU game window focused
- OVERLAY_HOTKEY_TOGGLE: Toggle with Ctrl+Shift+B (default)
- OVERLAY_TEMPORARY: Show 8 seconds on hotkey, then auto-hide

Changes:
- Activity bar now controlled by OverlayController
- Removed old _start_eu_focus_detection/_check_eu_focus methods
- Updated quit() to stop overlay controller
- Startup messages show current mode

Settings key: activity_bar.overlay_mode
Default: overlay_toggle
2026-02-16 00:15:54 +00:00
..
api fix: Syntax error in external_api.py - unterminated triple-quoted string 2026-02-15 18:19:13 +00:00
data feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
ui fix: Add missing QPixmap and Qt imports in tray_icon.py 2026-02-15 23:43:06 +00:00
widgets fix: Add missing QPixmap and Qt imports in tray_icon.py 2026-02-15 23:43:06 +00:00
README.md feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
__init__.py fix: Additional bug fixes from Bug Hunter agent 2026-02-15 23:40:52 +00:00
activity_bar.py fix: Disable EU focus detection by default - fixes 4.5s UI freeze 2026-02-16 00:09:11 +00:00
activity_bar_enhanced.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
audio.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
backup.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
base_plugin.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
classy_dashboard.py feat: Classy Dashboard UI with modern glassmorphism design 2026-02-15 18:34:49 +00:00
clipboard.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
dashboard.py fix: Remove redundant Settings plugin and baked-in Spotify widget 2026-02-14 19:58:18 +00:00
dashboard_enhanced.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
data_store.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
data_store_secure.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
data_store_vulnerable.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
debug_logger.py feat: Add comprehensive debug logging for performance diagnosis 2026-02-15 23:59:00 +00:00
dependency_helper.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
eu_styles.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
event_bus.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
floating_icon.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
hotkey_manager.py feat: Fix system tray and add configurable hotkeys 2026-02-14 19:17:42 +00:00
http_client.py fix: Fix HTTPClient, Dashboard, and Log Parser errors 2026-02-14 23:40:09 +00:00
icon_extractor.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
icon_helper.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
icon_manager.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_reader.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_reader_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
log_watcher_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
logger.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
main.py feat: GW2/Blish-style overlay system with multiple visibility modes 2026-02-16 00:15:54 +00:00
main_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
memory_leak_detector.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
nexus_api.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
notifications.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ocr_backend_manager.py fix: Fix invalid escape sequence warning in ocr_backend_manager.py 2026-02-14 23:52:05 +00:00
ocr_service.py feat: Constrain skill scanner to only Entropia game window 2026-02-15 00:55:37 +00:00
ocr_service_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ocr_service_optimized_v2.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
overlay_controller.py feat: GW2/Blish-style overlay system with multiple visibility modes 2026-02-16 00:15:54 +00:00
overlay_widgets.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
overlay_window.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
perfect_ux.py feat: Expandable left sidebar with toggle button 2026-02-16 00:11:43 +00:00
performance_optimizations.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
plugin_api.py fix: Maintain backward compatibility for core.plugin_api imports 2026-02-15 18:07:19 +00:00
plugin_dependency_manager.py feat: Add plugin-to-plugin dependencies support 2026-02-14 23:49:13 +00:00
plugin_manager.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
plugin_manager_optimized.py fix: Move base_plugin.py to core module and update imports 2026-02-15 02:44:50 +00:00
plugin_store.py fix: Built-in Plugin Store, dependency dialog, removed settings/plugin_store plugins 2026-02-15 02:56:14 +00:00
plugin_ui_components.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
screenshot.py fix: Fix initialization order bug in ScreenshotService 2026-02-14 18:50:45 +00:00
screenshot_secure.py fix: Fix initialization order bug in ScreenshotService 2026-02-14 18:50:45 +00:00
screenshot_vulnerable.py fix: Fix initialization order bug in ScreenshotService 2026-02-14 18:50:45 +00:00
security_utils.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
settings.py feat: Development Swarm Excellence - Complete UI/UX Overhaul & Bug Fixes 2026-02-15 23:40:04 +00:00
settings_secure.py fix: Disable Spotify widget by default 2026-02-15 00:14:35 +00:00
startup_profiler.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
tasks.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
theme_manager.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
tray_icon.py feat: Add comprehensive debug logging for performance diagnosis 2026-02-15 23:59:00 +00:00
ui_optimizations.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
ui_render_optimized.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
updater.py feat: Core framework components - Settings, Dashboard, Search, Updater, Backup 2026-02-15 02:09:20 +00:00
widget_registry.py feat: Widget Registry - plugins register widgets dynamically 2026-02-15 16:16:07 +00:00
widget_system.py cleanup: Remove ClockWidget and SystemMonitorWidget from core 2026-02-15 16:18:02 +00:00
window_manager.py fix: Add timeout protection to window manager - fixes 4.5s UI freeze 2026-02-16 00:06:43 +00:00

README.md

EU-Utility Core Module

The core/ module contains the foundational functionality for EU-Utility, providing plugin management, API services, UI components, and utility functions.

Module Structure

core/
├── __init__.py                 # Package exports and version info
├── base_plugin.py              # BasePlugin abstract class
├── event_bus.py                # Typed event system
├── settings.py                 # Configuration management
├── plugin_api.py               # Backward compatibility wrapper
├── plugin_manager.py           # Plugin lifecycle management
│
├── api/                        # Three-tier API system
│   ├── __init__.py
│   ├── plugin_api.py           # PluginAPI - core services access
│   ├── widget_api.py           # WidgetAPI - overlay widgets
│   └── external_api.py         # ExternalAPI - third-party integrations
│
├── ui/                         # UI components
│   ├── __init__.py
│   ├── dashboard_view.py
│   ├── settings_view.py
│   └── search_view.py
│
└── utils/                      # Utility modules (to be created)
    ├── __init__.py
    ├── eu_styles.py            # Styling system
    ├── security_utils.py       # Security utilities
    └── helpers.py              # Common helpers

Key Components

1. BasePlugin (base_plugin.py)

Abstract base class that all plugins must inherit from.

from core.base_plugin import BasePlugin
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QLabel

class MyPlugin(BasePlugin):
    name = "My Plugin"
    version = "1.0.0"
    author = "Your Name"
    description = "What my plugin does"
    hotkey = "ctrl+shift+y"
    
    def initialize(self) -> None:
        self.log_info("My Plugin initialized!")
    
    def get_ui(self) -> QWidget:
        widget = QWidget()
        layout = QVBoxLayout(widget)
        layout.addWidget(QLabel("Hello from My Plugin!"))
        return widget

2. EventBus (event_bus.py)

Typed event system for plugin communication.

from core.event_bus import get_event_bus, LootEvent, DamageEvent

bus = get_event_bus()

# Subscribe to events
sub_id = bus.subscribe_typed(
    LootEvent,
    handle_loot,
    mob_types=["Atrox", "Daikiba"]
)

# Publish events
bus.publish(LootEvent(
    mob_name="Atrox",
    items=[{"name": "Animal Oil", "value": 0.05}],
    total_tt_value=0.05
))

Available event types:

  • SkillGainEvent - Skill increases
  • LootEvent - Loot received
  • DamageEvent - Combat damage
  • GlobalEvent - Global announcements
  • ChatEvent - Chat messages
  • EconomyEvent - Economic transactions
  • SystemEvent - System notifications

3. Settings (settings.py)

Configuration management with automatic persistence.

from core.settings import get_settings

settings = get_settings()

# Get/set values
theme = settings.get('overlay_theme', 'dark')
settings.set('overlay_theme', 'light')

# Plugin management
if settings.is_plugin_enabled('my_plugin'):
    settings.enable_plugin('my_plugin')

4. PluginAPI (api/plugin_api.py)

Primary API for accessing core services.

from core.api import get_api

api = get_api()

# Log reading
lines = api.read_log_lines(100)

# Window info
window = api.get_eu_window()

# OCR
text = api.recognize_text(region=(100, 100, 200, 50))

# Notifications
api.show_notification("Title", "Message")

# Data storage
api.set_data("key", value)
value = api.get_data("key", default)

Service Architecture

The core uses a service registration pattern:

  1. Services are created during app initialization
  2. Services register themselves with PluginAPI
  3. Plugins access services through the unified API

Available Services

Service Description API Methods
Log Reader Read game chat.log read_log_lines()
Window Manager EU window info get_eu_window(), is_eu_focused()
OCR Screen text recognition recognize_text()
Screenshot Screen capture capture_screen()
Nexus API Item database search_items(), get_item_details()
HTTP Client Web requests http_get(), http_post()
Audio Sound playback play_sound()
Notifications Toast notifications show_notification()
Clipboard Copy/paste copy_to_clipboard(), paste_from_clipboard()
Event Bus Pub/sub events subscribe(), publish()
Data Store Key-value storage set_data(), get_data()
Tasks Background execution run_task()

Best Practices

For Plugin Developers

  1. Always inherit from BasePlugin: Use the provided base class for consistent behavior
  2. Use type hints: Add type annotations for better IDE support
  3. Handle errors gracefully: Wrap external calls in try/except blocks
  4. Clean up in shutdown(): Unsubscribe from events, close resources
  5. Use the API: Access services through PluginAPI rather than direct imports

For Core Contributors

  1. Maintain backward compatibility: Don't break existing plugin APIs
  2. Add type hints: All public methods should have type annotations
  3. Document thoroughly: Use docstrings with Args, Returns, Examples
  4. Follow PEP 8: Consistent naming (snake_case for functions/variables)
  5. Use lazy initialization: Expensive services should initialize on first use

Version History

Version Changes
2.1.0 Added comprehensive type hints, improved documentation
2.0.0 Three-tier API architecture, typed EventBus
1.0.0 Initial release

See Also