def _cancel(self) -> None: from bastd.ui.playlist.editgame import PlaylistEditGameWindow ba.containerwidget(edit=self._root_widget, transition='out_right') ba.app.ui.set_main_menu_window( PlaylistEditGameWindow( self._gametype, self._sessiontype, self._config, self._completion_call, default_selection='map', transition='in_left', edit_info=self._edit_info).get_root_widget())
def _select(self, map_name: str) -> None: from bastd.ui.playlist.editgame import PlaylistEditGameWindow self._config['settings']['map'] = map_name ba.containerwidget(edit=self._root_widget, transition='out_right') ba.app.ui.set_main_menu_window( PlaylistEditGameWindow( self._gameclass, self._sessiontype, self._config, self._completion_call, default_selection='map', transition='in_left', edit_info=self._edit_info).get_root_widget())
def create_default_game_settings_ui( self, gameclass: Type[ba.GameActivity], sessiontype: Type[ba.Session], settings: Optional[dict], completion_call: Callable[[Optional[dict]], Any]) -> None: """(internal)""" # Replace the main window once we come up successfully. from bastd.ui.playlist.editgame import PlaylistEditGameWindow prev_window = ba.app.main_menu_window ba.app.main_menu_window = (PlaylistEditGameWindow( gameclass, sessiontype, settings, completion_call=completion_call).get_root_widget()) ba.containerwidget(edit=prev_window, transition='out_left')