mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Added Sounds
This commit is contained in:
parent
617e5145bd
commit
6a7a6a170c
1 changed files with 12 additions and 0 deletions
|
|
@ -46,6 +46,10 @@ async def send_network_request(request):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
def play_sound():
|
||||||
|
ba.playsound(ba.getsound('swish'))
|
||||||
|
|
||||||
|
|
||||||
class Category:
|
class Category:
|
||||||
def __init__(self, name, base_download_url, meta_url):
|
def __init__(self, name, base_download_url, meta_url):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
@ -345,22 +349,27 @@ class PluginWindow(popup.PopupWindow):
|
||||||
|
|
||||||
@button
|
@button
|
||||||
async def disable(self) -> None:
|
async def disable(self) -> None:
|
||||||
|
play_sound()
|
||||||
await self.plugin.disable()
|
await self.plugin.disable()
|
||||||
|
|
||||||
@button
|
@button
|
||||||
async def enable(self) -> None:
|
async def enable(self) -> None:
|
||||||
|
play_sound()
|
||||||
await self.plugin.enable()
|
await self.plugin.enable()
|
||||||
|
|
||||||
@button
|
@button
|
||||||
async def install(self):
|
async def install(self):
|
||||||
|
play_sound()
|
||||||
await self.plugin.install()
|
await self.plugin.install()
|
||||||
|
|
||||||
@button
|
@button
|
||||||
async def uninstall(self):
|
async def uninstall(self):
|
||||||
|
play_sound()
|
||||||
await self.plugin.uninstall()
|
await self.plugin.uninstall()
|
||||||
|
|
||||||
@button
|
@button
|
||||||
async def update(self):
|
async def update(self):
|
||||||
|
play_sound()
|
||||||
await self.plugin.update()
|
await self.plugin.update()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -558,6 +567,7 @@ class PluginManagerWindow(ba.Window, PluginManager):
|
||||||
# self._refresh()
|
# self._refresh()
|
||||||
|
|
||||||
def _back(self) -> None:
|
def _back(self) -> None:
|
||||||
|
play_sound()
|
||||||
from bastd.ui.settings.allsettings import AllSettingsWindow
|
from bastd.ui.settings.allsettings import AllSettingsWindow
|
||||||
ba.containerwidget(edit=self._root_widget,
|
ba.containerwidget(edit=self._root_widget,
|
||||||
transition=self._transition_out)
|
transition=self._transition_out)
|
||||||
|
|
@ -744,6 +754,7 @@ class PluginManagerWindow(ba.Window, PluginManager):
|
||||||
self.plugins_in_current_view[plugin.name] = text_widget
|
self.plugins_in_current_view[plugin.name] = text_widget
|
||||||
|
|
||||||
def show_categories(self):
|
def show_categories(self):
|
||||||
|
play_sound()
|
||||||
# On each new entry, change position to y -= 40.
|
# On each new entry, change position to y -= 40.
|
||||||
# value = bastd.ui.popup.PopupMenuWindow(
|
# value = bastd.ui.popup.PopupMenuWindow(
|
||||||
bastd.ui.popup.PopupMenuWindow(
|
bastd.ui.popup.PopupMenuWindow(
|
||||||
|
|
@ -781,6 +792,7 @@ class PluginManagerWindow(ba.Window, PluginManager):
|
||||||
await self.select_category(self.selected_category)
|
await self.select_category(self.selected_category)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
|
play_sound()
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.create_task(self._refresh())
|
loop.create_task(self._refresh())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue