Пример #1
0
 def _do_advanced(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings.advanced import AdvancedSettingsWindow
     self._save_state()
     ba.containerwidget(edit=self._root_widget, transition='out_left')
     ba.app.main_menu_window = (AdvancedSettingsWindow(
         origin_widget=self._advanced_button).get_root_widget())
 def _do_back(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings.advanced import AdvancedSettingsWindow
     ba.containerwidget(edit=self._root_widget, transition='out_right')
     backwin = (self._back_call() if self._back_call is not None else
                AdvancedSettingsWindow(transition='in_left'))
     ba.app.ui.set_main_menu_window(backwin.get_root_widget())
Пример #3
0
 def _do_back(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings.advanced import AdvancedSettingsWindow
     self._save_state()
     ba.containerwidget(edit=self._root_widget,
                        transition=self._transition_out)
     ba.app.ui.set_main_menu_window(
         AdvancedSettingsWindow(transition='in_left').get_root_widget())
Пример #4
0
 def _do_enter(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings.advanced import AdvancedSettingsWindow
     ba.containerwidget(edit=self._root_widget,
                        transition=self._transition_out)
     if not self._modal:
         ba.app.ui.set_main_menu_window(
             AdvancedSettingsWindow(transition='in_left').get_root_widget())
     _ba.add_transaction({
         'type': 'PROMO_CODE',
         'expire_time': time.time() + 5,
         'code': ba.textwidget(query=self._text_field)
     })
     _ba.run_transactions()
Пример #5
0
 def _done(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings.advanced import AdvancedSettingsWindow
     ba.containerwidget(edit=self._root_widget, transition='out_right')
     ba.app.ui.set_main_menu_window(
         AdvancedSettingsWindow(transition='in_left').get_root_widget())