Ballistica Logo

bauiv1lib.playlist package

Submodules

bauiv1lib.playlist.addgame module

Provides a window for selecting a game type to add to a playlist.

class bauiv1lib.playlist.addgame.PlaylistAddGameWindow(editcontroller: PlaylistEditController, transition: str | None = 'in_right', origin_widget: bui.Widget | None = None)[source]

Bases: MainWindow

Window for selecting a game type to add to a playlist.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

bauiv1lib.playlist.browser module

Provides a window for browsing and launching game playlists.

class bauiv1lib.playlist.browser.PlaylistBrowserWindow(sessiontype: type[bs.Session], transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, playlist_select_context: PlaylistSelectContext | None = None)[source]

Bases: MainWindow

Window for starting teams games.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

on_main_window_close() None[source]

Called before transitioning out a main window.

A good opportunity to save window state/etc.

on_play_options_window_run_game() None[source]

(internal)

bauiv1lib.playlist.customizebrowser module

Provides UI for viewing/creating/editing playlists.

class bauiv1lib.playlist.customizebrowser.PlaylistCustomizeBrowserWindow(sessiontype: type[bs.Session], transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, select_playlist: str | None = None)[source]

Bases: MainWindow

Window for viewing a playlist.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

on_main_window_close() None[source]

Called before transitioning out a main window.

A good opportunity to save window state/etc.

bauiv1lib.playlist.edit module

Provides a window for editing individual game playlists.

class bauiv1lib.playlist.edit.PlaylistEditWindow(editcontroller: PlaylistEditController, transition: str | None = 'in_right', origin_widget: bui.Widget | None = None)[source]

Bases: MainWindow

Window for editing an individual game playlist.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

bauiv1lib.playlist.editcontroller module

Defines a controller for wrangling playlist edit UIs.

class bauiv1lib.playlist.editcontroller.PlaylistEditController(sessiontype: type[bs.Session], from_window: bui.MainWindow, *, existing_playlist_name: str | None = None, playlist: list[dict[str, Any]] | None = None, playlist_name: str | None = None)[source]

Bases: object

Coordinates various UIs involved in playlist editing.

add_game_pressed(from_window: MainWindow) None[source]

(internal)

add_game_type_selected(gametype: type[GameActivity], from_window: MainWindow) None[source]

(internal)

edit_game_pressed(from_window: MainWindow) None[source]

Should be called by supplemental UIs when a game is to be edited.

get_config_name() str[source]

(internal)

get_default_list_name() Lstr[source]

(internal)

get_edit_ui_selection() str | None[source]

(internal)

get_existing_playlist_name() str | None[source]

(internal)

get_playlist() list[dict[str, Any]][source]

Return the current state of the edited playlist.

get_selected_index() int[source]

Return the index of the selected playlist.

get_session_type() type[Session][source]

Return the bascenev1.Session type for this edit-session.

getname() str[source]

(internal)

set_edit_ui_selection(selection: str) None[source]

(internal)

set_playlist(playlist: list[dict[str, Any]]) None[source]

Set the playlist contents.

set_selected_index(index: int) None[source]

Sets the selected playlist index.

setname(name: str) None[source]

(internal)

bauiv1lib.playlist.editgame module

Provides UI for editing a game config.

class bauiv1lib.playlist.editgame.PlaylistEditGameWindow(gametype: type[bs.GameActivity], sessiontype: type[bs.Session], config: dict[str, Any] | None, completion_call: Callable[[dict[str, Any] | None, bui.MainWindow], Any], default_selection: str | None = None, transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, edit_info: dict[str, Any] | None = None)[source]

Bases: MainWindow

Window for editing a game config.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

bauiv1lib.playlist.mapselect module

Provides UI for selecting maps in playlists.

class bauiv1lib.playlist.mapselect.PlaylistMapSelectWindow(gametype: type[bs.GameActivity], sessiontype: type[bs.Session], config: dict[str, Any], edit_info: dict[str, Any], completion_call: Callable[[dict[str, Any] | None, bui.MainWindow], Any], transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, select_get_more_maps_button: bool = False)[source]

Bases: MainWindow

Window to select a map.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this window, if supported.

bauiv1lib.playlist.share module

UI functionality for importing shared playlists.

class bauiv1lib.playlist.share.SharePlaylistImportWindow(origin_widget: bui.Widget | None = None, on_success_callback: Callable[[], Any] | None = None)[source]

Bases: SendInfoWindow

Window for importing a shared playlist.

class bauiv1lib.playlist.share.SharePlaylistResultsWindow(name: str, data: str, origin: tuple[float, float] = (0.0, 0.0))[source]

Bases: Window

Window for sharing playlists.

close() None[source]

Close the window.

Module contents

Playlist ui functionality.

class bauiv1lib.playlist.PlaylistTypeVars(sessiontype: type[Session])[source]

Bases: object

Defines values for a playlist type (config names to use, etc).