diff --git a/plugins/utilities.json b/plugins/utilities.json index 0882250..a0bb9eb 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -864,6 +864,7 @@ } ], "versions": { + "3.0.0": null, "2.1.1": { "api_version": 9, "commit_sha": "e604a3c", @@ -2328,4 +2329,4 @@ } } } -} \ No newline at end of file +} diff --git a/plugins/utilities/store_event_specials.py b/plugins/utilities/store_event_specials.py index ec01f66..f0faed6 100644 --- a/plugins/utilities/store_event_specials.py +++ b/plugins/utilities/store_event_specials.py @@ -27,7 +27,8 @@ from typing import List, Dict, Any import babase import bauiv1 as bui - +from bauiv1lib.store.browser import StoreBrowserWindow +from bauiv1._appsubsystem import UIV1AppSubsystem original_get_store_layout = bui.app.classic.store.get_store_layout @@ -64,3 +65,22 @@ def modified_get_store_layout() -> Dict[str, List[Dict[str, Any]]]: class Main(babase.Plugin): def on_app_running(self) -> None: bui.app.classic.store.get_store_layout = modified_get_store_layout + def has_settings_ui(self): + return True + def show_settings_ui(self, button): + try: + main_window = UIV1AppSubsystem().get_main_window() + if main_window: + main_window.main_window_replace(lambda:StoreBrowserWindow( + show_tab=StoreBrowserWindow.TabID.MINIGAMES, + origin_widget=button, + ) + ) + else: + StoreBrowserWindow( + show_tab=StoreBrowserWindow.TabID.MINIGAMES, + origin_widget=button, + ) + except Exception as e: + print(e) +