Fixing Position of Loading Text and Added Sounds

This commit is contained in:
Vishal 2022-08-08 21:09:07 +05:30 committed by GitHub
parent b43e4133a9
commit d11d4eadcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -450,6 +450,7 @@ class PluginWindow(popup.PopupWindow):
# ba.containerwidget(edit=self._root_widget, start_button=button3)
def _ok(self) -> None:
play_sound()
ba.containerwidget(edit=self._root_widget, transition='out_scale')
def button(fn):
@ -594,9 +595,12 @@ class PluginManagerWindow(ba.Window, PluginManager):
maxwidth=270,
)
loading_pos_y = self._height - (235 if _uiscale is ba.UIScale.SMALL else
220 if _uiscale is ba.UIScale.MEDIUM else 250)
self._loading_text = ba.textwidget(
parent=self._root_widget,
position=(35, self._height - 150),
position=(-5, loading_pos_y),
size=(self._width, 25),
text="Loading...",
color=ba.app.ui.title_color,
@ -728,7 +732,7 @@ class PluginManagerWindow(ba.Window, PluginManager):
pass
except urllib.error.URLError:
ba.textwidget(edit=self._loading_text,
text="Make sure you are connected to the Internet and try again.")
text="Make sure you are connected\n to the Internet and try again.")
else:
self._loading_text.delete()
@ -995,6 +999,7 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
# _ba.app.api_version
def _disappear(self) -> None:
play_sound()
ba.containerwidget(edit=self._root_widget, transition='out_scale')
def _open(self) -> None: