Example #1
0
 def _default_on_activate_call(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.account import show_sign_in_prompt
     from bastd.ui.store.browser import StoreBrowserWindow
     if _ba.get_account_state() != 'signed_in':
         show_sign_in_prompt()
         return
     StoreBrowserWindow(modal=True, origin_widget=self._button)
Example #2
0
 def _on_store_press(self) -> None:
     from bastd.ui import account
     from bastd.ui.store.browser import StoreBrowserWindow
     if _ba.get_v1_account_state() != 'signed_in':
         account.show_sign_in_prompt()
         return
     StoreBrowserWindow(modal=True,
                        show_tab=StoreBrowserWindow.TabID.MAPS,
                        on_close_call=self._on_store_close,
                        origin_widget=self._get_more_maps_button)
Example #3
0
 def _on_store_press(self) -> None:
     from bastd.ui.account import show_sign_in_prompt
     from bastd.ui.store.browser import StoreBrowserWindow
     if _ba.get_account_state() != 'signed_in':
         show_sign_in_prompt()
         return
     self._transition_out()
     StoreBrowserWindow(modal=True,
                        show_tab=StoreBrowserWindow.TabID.ICONS,
                        origin_widget=self._get_more_icons_button)
Example #4
0
 def _on_get_more_games_press(self) -> None:
     from bastd.ui.account import show_sign_in_prompt
     from bastd.ui.store.browser import StoreBrowserWindow
     if _ba.get_account_state() != 'signed_in':
         show_sign_in_prompt()
         return
     StoreBrowserWindow(modal=True,
                        show_tab=StoreBrowserWindow.TabID.MINIGAMES,
                        on_close_call=self._on_store_close,
                        origin_widget=self._get_more_games_button)
Example #5
0
 def _on_store_pressed(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.store.browser import StoreBrowserWindow
     from bastd.ui.account import show_sign_in_prompt
     if _ba.get_account_state() != 'signed_in':
         show_sign_in_prompt()
         return
     self._save_state()
     ba.containerwidget(edit=self._root_widget, transition='out_left')
     ba.app.main_menu_window = (StoreBrowserWindow(
         origin_widget=self._store_button).get_root_widget())