Ejemplo n.º 1
0
 def _do_advanced(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings import advanced
     self._save_state()
     ba.containerwidget(edit=self._root_widget, transition='out_left')
     ba.app.main_menu_window = (advanced.AdvancedSettingsWindow(
         origin_widget=self._advanced_button).get_root_widget())
Ejemplo n.º 2
0
 def _do_back(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings import advanced
     ba.containerwidget(edit=self._root_widget,
                        transition=self._transition_out)
     if not self._modal:
         ba.app.main_menu_window = (advanced.AdvancedSettingsWindow(
             transition='in_left').get_root_widget())
Ejemplo n.º 3
0
 def _do_enter(self) -> None:
     # pylint: disable=cyclic-import
     from bastd.ui.settings import advanced
     ba.containerwidget(edit=self._root_widget,
                        transition=self._transition_out)
     if not self._modal:
         ba.app.main_menu_window = (advanced.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()