From 6020ef9d836e204ea9aacc465b3046622b71addb Mon Sep 17 00:00:00 2001 From: Era <100019405+EraOSBeta@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:51:17 +0330 Subject: [PATCH] Removed Discord button from main menu --- .idea/ballisticakit.iml | 2 +- .idea/misc.xml | 2 +- .../ba_data/python/bauiv1lib/mainmenu.py | 36 +------------------ 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/.idea/ballisticakit.iml b/.idea/ballisticakit.iml index 45327b93..a6be3df9 100644 --- a/.idea/ballisticakit.iml +++ b/.idea/ballisticakit.iml @@ -65,7 +65,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index e94ce45b..7addf5d9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -6,7 +6,7 @@ - + diff --git a/src/assets/ba_data/python/bauiv1lib/mainmenu.py b/src/assets/ba_data/python/bauiv1lib/mainmenu.py index 91e1e75f..cacb3fdf 100644 --- a/src/assets/ba_data/python/bauiv1lib/mainmenu.py +++ b/src/assets/ba_data/python/bauiv1lib/mainmenu.py @@ -105,7 +105,6 @@ class MainMenuWindow(bui.Window): import bauiv1lib.gather as _unused10 import bauiv1lib.watch as _unused11 import bauiv1lib.play as _unused12 - import bauiv1lib.discord as _unused13 def _show_remote_app_info_on_first_launch(self) -> None: app = bui.app @@ -218,7 +217,7 @@ class MainMenuWindow(bui.Window): self._have_store_button = not self._in_game - self._have_settings_button = self._have_discord_button = ( + self._have_settings_button = ( not self._in_game or not app.ui_v1.use_toolbars ) and not (self._is_demo or self._is_arcade) @@ -366,24 +365,6 @@ class MainMenuWindow(bui.Window): else: self._store_button = None - self._discord_button: bui.Widget | None - if self._have_discord_button: - h, v, scale = positions[self._p_index] - self._p_index += 1 - self._discord_button = bui.buttonwidget( - parent=self._root_widget, - position=(h - self._button_width * 0.5 * scale, v), - size=(self._button_width, self._button_height), - scale=scale, - autoselect=self._use_autoselect, - label='Discord', - transition_delay=self._tdelay, - on_activate_call=self._discord, - ) - self._tdelay += self._t_delay_inc - else: - self._discord_button = None - self._quit_button: bui.Widget | None if not self._in_game and self._have_quit_button: h, v, scale = positions[self._p_index] @@ -582,8 +563,6 @@ class MainMenuWindow(bui.Window): b_count = 3 # play, help, credits if self._have_settings_button: b_count += 1 - if self._have_discord_button: - b_count += 1 if enable_account_button: b_count += 1 if self._have_quit_button: @@ -1223,13 +1202,6 @@ class MainMenuWindow(bui.Window): ).get_root_widget() ) - def _discord(self) -> None: - # pylint: disable=cyclic-import - from bauiv1lib.discord import DiscordWindow - - assert bui.app.classic is not None - DiscordWindow(origin_widget=self._settings_button).get_root_widget() - def _resume_and_call(self, call: Callable[[], Any]) -> None: self._resume() call() @@ -1242,8 +1214,6 @@ class MainMenuWindow(bui.Window): logging.warning('classic is required to show game service ui') def _save_state(self) -> None: - # pylint: disable=too-many-branches - # Don't do this for the in-game menu. if self._in_game: return @@ -1262,8 +1232,6 @@ class MainMenuWindow(bui.Window): ui.main_menu_selection = 'Credits' elif sel == self._settings_button: ui.main_menu_selection = 'Settings' - elif sel == self._discord_button: - ui.main_menu_selection = 'Discord' elif sel == self._account_button: ui.main_menu_selection = 'Account' elif sel == self._store_button: @@ -1297,8 +1265,6 @@ class MainMenuWindow(bui.Window): sel = self._credits_button elif sel_name == 'Settings': sel = self._settings_button - elif sel_name == 'Discord': - sel = self._discord_button elif sel_name == 'Account': sel = self._account_button elif sel_name == 'Store':