mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
commit
9ed934d82d
1 changed files with 19 additions and 11 deletions
|
|
@ -483,14 +483,14 @@ class PluginManagerWindow(ba.Window, PluginManager):
|
||||||
|
|
||||||
self._loading_text = ba.textwidget(
|
self._loading_text = ba.textwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(-10, self._height - 150),
|
position=(35, self._height - 150),
|
||||||
size=(self._width, 25),
|
size=(self._width, 25),
|
||||||
text="Loading...",
|
text="Loading...",
|
||||||
color=ba.app.ui.title_color,
|
color=ba.app.ui.title_color,
|
||||||
scale=0.7,
|
scale=0.7,
|
||||||
h_align="center",
|
h_align="center",
|
||||||
v_align="center",
|
v_align="center",
|
||||||
maxwidth=270,
|
maxwidth=400,
|
||||||
)
|
)
|
||||||
|
|
||||||
scroll_size_x = (400 if _uiscale is ba.UIScale.SMALL else
|
scroll_size_x = (400 if _uiscale is ba.UIScale.SMALL else
|
||||||
|
|
@ -601,15 +601,23 @@ class PluginManagerWindow(ba.Window, PluginManager):
|
||||||
self.categories["All"] = CategoryAll(plugins=all_plugins)
|
self.categories["All"] = CategoryAll(plugins=all_plugins)
|
||||||
|
|
||||||
async def plugin_index(self):
|
async def plugin_index(self):
|
||||||
index = await super().get_index()
|
try:
|
||||||
await asyncio.gather(
|
index = await super().get_index()
|
||||||
self.draw_refresh_icon(),
|
await asyncio.gather(
|
||||||
self.draw_settings_icon(),
|
self.draw_refresh_icon(),
|
||||||
self.setup_plugin_categories(index),
|
self.draw_settings_icon(),
|
||||||
)
|
self.setup_plugin_categories(index),
|
||||||
self._loading_text.delete()
|
)
|
||||||
await self.select_category("All")
|
await self.select_category("All")
|
||||||
await self.draw_search_bar()
|
await self.draw_search_bar()
|
||||||
|
except RuntimeError:
|
||||||
|
# User probably went back before the PluginManagerWindow could finish loading.
|
||||||
|
pass
|
||||||
|
except urllib.error.URLError:
|
||||||
|
ba.textwidget(edit=self._loading_text,
|
||||||
|
text="Make sure you are connected to the Internet and try again.")
|
||||||
|
else:
|
||||||
|
self._loading_text.delete()
|
||||||
|
|
||||||
async def draw_category_selection_button(self, label=None):
|
async def draw_category_selection_button(self, label=None):
|
||||||
# v = (self._height - 75) if _uiscale is ba.UIScale.SMALL else (self._height - 105)
|
# v = (self._height - 75) if _uiscale is ba.UIScale.SMALL else (self._height - 105)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue