mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Added has_settings_ui() and show_settings_ui()
This commit is contained in:
parent
bd291542be
commit
e1e5097ebb
1 changed files with 8 additions and 6 deletions
|
|
@ -4,14 +4,13 @@ from typing import TYPE_CHECKING, cast
|
|||
if TYPE_CHECKING:
|
||||
from typing import Any, Sequence, Callable, List, Dict, Tuple, Optional, Union
|
||||
|
||||
import random
|
||||
import ba
|
||||
import _ba
|
||||
import random
|
||||
from ba._map import Map
|
||||
from bastd import mainmenu
|
||||
from bastd.ui.party import PartyWindow
|
||||
from bastd.gameutils import SharedObjects
|
||||
from time import sleep
|
||||
|
||||
"""mood light plugin by ʟօʊքɢǟʀօʊ
|
||||
type ml in chat or use plugin manager to open settings"""
|
||||
|
|
@ -262,7 +261,7 @@ def new_chat_message(msg: Union[str, ba.Lstr], clients: Sequence[int] = None, se
|
|||
SettingWindow()
|
||||
cprint("Mood light settings opened")
|
||||
except Exception as err:
|
||||
Print(err)
|
||||
Print(err,"-from new_chat_message")
|
||||
|
||||
|
||||
old_fcm = _ba.chatmessage
|
||||
|
|
@ -280,9 +279,12 @@ class moodlight(ba.Plugin):
|
|||
def on_app_running(self):
|
||||
_ba.show_progress_bar()
|
||||
|
||||
def on_plugin_manager_prompt(self): # called by plugin manager
|
||||
def has_settings_ui(self):
|
||||
return True
|
||||
def show_settings_ui(self,button):
|
||||
SettingWindow()
|
||||
|
||||
|
||||
def _new_init(self, vr_overlay_offset: Optional[Sequence[float]] = None) -> None:
|
||||
self._old_init(vr_overlay_offset)
|
||||
in_game = not isinstance(_ba.get_foreground_host_session(), mainmenu.MainMenuSession)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue