mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
Updated store_event_special plugin
This commit is contained in:
parent
c30c53bd52
commit
8fe514c2b7
2 changed files with 23 additions and 2 deletions
|
|
@ -864,6 +864,7 @@
|
|||
}
|
||||
],
|
||||
"versions": {
|
||||
"3.0.0": null,
|
||||
"2.1.1": {
|
||||
"api_version": 9,
|
||||
"commit_sha": "e604a3c",
|
||||
|
|
@ -2328,4 +2329,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue