bauiv1lib package¶
Subpackages¶
- bauiv1lib.account package
- bauiv1lib.coop package
- bauiv1lib.gather package
- Submodules
- bauiv1lib.gather.abouttab module
- bauiv1lib.gather.manualtab module
- bauiv1lib.gather.nearbytab module
- bauiv1lib.gather.privatetab module
- bauiv1lib.gather.publictab module
AddrFetchThread
PartyEntry
PartyEntry.address
PartyEntry.claimed
PartyEntry.clean_display_index
PartyEntry.get_key()
PartyEntry.index
PartyEntry.name
PartyEntry.next_ping_time
PartyEntry.ping
PartyEntry.ping_attempts
PartyEntry.ping_interval
PartyEntry.ping_responses
PartyEntry.port
PartyEntry.queue
PartyEntry.size
PartyEntry.size_max
PartyEntry.stats_addr
PingThread
PublicGatherTab
Selection
SelectionComponent
State
SubTabType
UIRow
- Module contents
- bauiv1lib.keyboard package
- bauiv1lib.league package
- bauiv1lib.playlist package
- Submodules
- bauiv1lib.playlist.addgame module
- bauiv1lib.playlist.browser module
- bauiv1lib.playlist.customizebrowser module
- bauiv1lib.playlist.edit module
- bauiv1lib.playlist.editcontroller module
PlaylistEditController
PlaylistEditController.add_game_pressed()
PlaylistEditController.add_game_type_selected()
PlaylistEditController.edit_game_pressed()
PlaylistEditController.get_config_name()
PlaylistEditController.get_default_list_name()
PlaylistEditController.get_edit_ui_selection()
PlaylistEditController.get_existing_playlist_name()
PlaylistEditController.get_playlist()
PlaylistEditController.get_selected_index()
PlaylistEditController.get_session_type()
PlaylistEditController.getname()
PlaylistEditController.set_edit_ui_selection()
PlaylistEditController.set_playlist()
PlaylistEditController.set_selected_index()
PlaylistEditController.setname()
- bauiv1lib.playlist.editgame module
- bauiv1lib.playlist.mapselect module
- bauiv1lib.playlist.share module
- Module contents
- bauiv1lib.profile package
- Submodules
- bauiv1lib.profile.browser module
- bauiv1lib.profile.edit module
EditProfileWindow
EditProfileWindow.assign_random_name()
EditProfileWindow.color_picker_closing()
EditProfileWindow.color_picker_selected_color()
EditProfileWindow.get_main_window_state()
EditProfileWindow.getname()
EditProfileWindow.on_character_picker_get_more_press()
EditProfileWindow.on_character_picker_pick()
EditProfileWindow.on_icon_picker_get_more_press()
EditProfileWindow.on_icon_picker_pick()
EditProfileWindow.refresh_characters()
EditProfileWindow.reload_window()
EditProfileWindow.save()
EditProfileWindow.show_account_profile_info()
EditProfileWindow.show_global_profile_info()
EditProfileWindow.show_local_profile_info()
EditProfileWindow.upgrade_profile()
- bauiv1lib.profile.upgrade module
- Module contents
- bauiv1lib.settings package
- Submodules
- bauiv1lib.settings.advanced module
- bauiv1lib.settings.allsettings module
- bauiv1lib.settings.audio module
- bauiv1lib.settings.benchmarks module
- bauiv1lib.settings.controls module
- bauiv1lib.settings.devtools module
- bauiv1lib.settings.gamepad module
AwaitGamepadInputWindow
GamepadSettingsWindow
GamepadSettingsWindow.get_advanced_button()
GamepadSettingsWindow.get_auto_recalibrate_analog_stick_value()
GamepadSettingsWindow.get_control_value_name()
GamepadSettingsWindow.get_enable_secondary_value()
GamepadSettingsWindow.get_ext()
GamepadSettingsWindow.get_ignore_completely_value()
GamepadSettingsWindow.get_input()
GamepadSettingsWindow.get_is_secondary()
GamepadSettingsWindow.get_main_window_state()
GamepadSettingsWindow.get_r()
GamepadSettingsWindow.get_settings()
GamepadSettingsWindow.get_start_button_activates_default_widget_value()
GamepadSettingsWindow.get_ui_only_value()
GamepadSettingsWindow.get_unassigned_buttons_run_value()
GamepadSettingsWindow.popup_menu_closing()
GamepadSettingsWindow.popup_menu_selected_choice()
GamepadSettingsWindow.set_auto_recalibrate_analog_stick_value()
GamepadSettingsWindow.set_ignore_completely_value()
GamepadSettingsWindow.set_start_button_activates_default_widget_value()
GamepadSettingsWindow.set_ui_only_value()
GamepadSettingsWindow.set_unassigned_buttons_run_value()
GamepadSettingsWindow.show_secondary_editor()
- bauiv1lib.settings.gamepadadvanced module
- bauiv1lib.settings.gamepadselect module
- bauiv1lib.settings.graphics module
- bauiv1lib.settings.keyboard module
- bauiv1lib.settings.nettesting module
- bauiv1lib.settings.plugins module
- bauiv1lib.settings.pluginsettings module
- bauiv1lib.settings.remoteapp module
- bauiv1lib.settings.testing module
- bauiv1lib.settings.touchscreen module
- bauiv1lib.settings.vrtesting module
- Module contents
- bauiv1lib.soundtrack package
- bauiv1lib.store package
Submodules¶
bauiv1lib.achievements module¶
Provides a popup window to view achievements.
- class bauiv1lib.achievements.AchievementsWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Popup window to view achievements.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.appinvite module¶
UI functionality related to inviting people to try the game.
bauiv1lib.characterpicker module¶
Provides a picker for characters.
- class bauiv1lib.characterpicker.CharacterPicker(parent: bui.Widget, position: tuple[float, float] = (0.0, 0.0), delegate: CharacterPickerDelegate | None = None, scale: float | None = None, offset: tuple[float, float] = (0.0, 0.0), tint_color: Sequence[float] = (1.0, 1.0, 1.0), tint2_color: Sequence[float] = (1.0, 1.0, 1.0), selected_character: str | None = None)[source]¶
Bases:
PopupWindow
Popup window for selecting characters.
bauiv1lib.colorpicker module¶
Provides popup windows for choosing colors.
- class bauiv1lib.colorpicker.ColorPicker(parent: bui.Widget, position: tuple[float, float], *, initial_color: Sequence[float] = (1.0, 1.0, 1.0), delegate: Any = None, scale: float | None = None, offset: tuple[float, float] = (0.0, 0.0), tag: Any = '')[source]¶
Bases:
PopupWindow
A popup UI to select from a set of colors.
Passes the color to the delegate’s color_picker_selected_color() method.
- class bauiv1lib.colorpicker.ColorPickerExact(parent: bui.Widget, position: tuple[float, float], *, initial_color: Sequence[float] = (1.0, 1.0, 1.0), delegate: Any = None, scale: float | None = None, offset: tuple[float, float] = (0.0, 0.0), tag: Any = '')[source]¶
Bases:
PopupWindow
pops up a ui to select from a set of colors. passes the color to the delegate’s color_picker_selected_color() method
- bauiv1lib.colorpicker.color_overlay_func(r: float, g: float, b: float, a: float | None = None) tuple [source]¶
I could NOT come up with a better function name.
- Parameters:
r (float) – Red.
g (float) – Green.
b (float) – Blue.
a (float | None, optional) – Alpha. Defaults to None.
- Returns:
- A brighter color if the provided one is dark,
and a darker one if it’s darker.
- Return type:
tuple
- bauiv1lib.colorpicker.color_to_hex(r: float, g: float, b: float, a: float | None = 1.0) str [source]¶
Converts an rgb1 tuple to a HEX color code.
- Parameters:
r (float) – Red.
g (float) – Green.
b (float) – Blue.
a (float, optional) – Alpha. Defaults to 1.0.
- Returns:
The hexified rgba values.
- Return type:
str
- bauiv1lib.colorpicker.hex_to_color(hex_color: str) tuple [source]¶
Transforms an RGB / RGBA hex code into an rgb1/rgba1 tuple.
- Parameters:
hex_color (str) – The HEX color.
- Raises:
ValueError – If the provided HEX color isn’t 6 or 8 characters long.
- Returns:
The color tuple divided by 255.
- Return type:
tuple
bauiv1lib.config module¶
Functionality for editing config values and applying them to the game.
- class bauiv1lib.config.ConfigCheckBox(parent: bui.Widget, configkey: str, position: tuple[float, float], size: tuple[float, float], *, displayname: str | bui.Lstr | None = None, scale: float | None = None, maxwidth: float | None = None, autoselect: bool = True, value_change_call: Callable[[Any], Any] | None = None)[source]¶
Bases:
object
A checkbox wired up to control a config value.
It will automatically save and apply the config when its value changes.
- class bauiv1lib.config.ConfigNumberEdit(parent: bui.Widget, configkey: str, position: tuple[float, float], *, minval: float = 0.0, maxval: float = 100.0, increment: float = 1.0, callback: Callable[[float], Any] | None = None, xoffset: float = 0.0, displayname: str | bui.Lstr | None = None, changesound: bool = True, textscale: float = 1.0, as_percent: bool = False, fallback_value: float = 0.0, f: int = 1)[source]¶
Bases:
object
A set of controls for editing a numeric config value.
It will automatically save and apply the config when its value changes.
bauiv1lib.confirm module¶
Provides ConfirmWindow base class and commonly used derivatives.
- class bauiv1lib.confirm.ConfirmWindow(text: str | bui.Lstr | None = None, action: Callable[[], Any] | None = None, width: float = 360.0, height: float = 100.0, *, cancel_button: bool = True, cancel_is_selected: bool = False, color: tuple[float, float, float] = (1, 1, 1), text_scale: float = 1.0, ok_text: str | bui.Lstr | None = None, cancel_text: str | bui.Lstr | None = None, origin_widget: bui.Widget | None = None)[source]¶
Bases:
object
Window for answering simple yes/no questions.
bauiv1lib.connectivity module¶
UI functionality related to master-server connectivity.
- class bauiv1lib.connectivity.WaitForConnectivityWindow(on_connected: Callable[[], Any], on_cancel: Callable[[], Any] | None)[source]¶
Bases:
Window
Window informing the user that the game is establishing connectivity.
- bauiv1lib.connectivity.wait_for_connectivity(on_connected: Callable[[], Any], on_cancel: Callable[[], Any] | None = None) None [source]¶
Wait for the engine to establish a master-server connection.
If need be, shows a window to keep the user informed of connectivity state and allows the user to cancel the operation. Note that canceling does not prevent the engine from continuing its attempt to establish connectivity; it simply cancels the operation that depends on it.
bauiv1lib.credits module¶
Provides a window to display game credits.
- class bauiv1lib.credits.CreditsWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Window for displaying game credits.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.discord module¶
UI functionality for the Discord window.
bauiv1lib.feedback module¶
UI functionality related to users rating the game.
bauiv1lib.fileselector module¶
UI functionality for selecting files.
- class bauiv1lib.fileselector.FileSelectorWindow(path: str, callback: Callable[[str | None], Any] | None = None, *, show_base_path: bool = True, valid_file_extensions: Sequence[str] | None = None, allow_folders: bool = False, transition: str | None = 'in_right', origin_widget: bui.Widget | None = None)[source]¶
Bases:
MainWindow
Window for selecting files.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.getremote module¶
Provides a popup telling the user about the BSRemote app.
- class bauiv1lib.getremote.GetBSRemoteWindow[source]¶
Bases:
PopupWindow
Popup telling the user about BSRemote app.
bauiv1lib.gettokens module¶
UI functionality for purchasing/acquiring currency.
- class bauiv1lib.gettokens.GetTokensWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Window for purchasing/acquiring classic tickets.
- class State(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
What are we doing?
- HAVE_GOLD_PASS = 'have_gold_pass'¶
- LOADING = 'loading'¶
- NOT_SIGNED_IN = 'not_signed_in'¶
- SHOWING_STORE = 'showing_store'¶
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.help module¶
Provides help related ui.
- class bauiv1lib.help.HelpWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
A window providing help on how to play.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.iconpicker module¶
Provides a picker for icons.
- class bauiv1lib.iconpicker.IconPicker(parent: bui.Widget, position: tuple[float, float] = (0.0, 0.0), delegate: IconPickerDelegate | None = None, scale: float | None = None, *, offset: tuple[float, float] = (0.0, 0.0), tint_color: Sequence[float] = (1.0, 1.0, 1.0), tint2_color: Sequence[float] = (1.0, 1.0, 1.0), selected_icon: str | None = None)[source]¶
Bases:
PopupWindow
Picker for icons.
bauiv1lib.inbox module¶
Provides a popup window to view achievements.
- class bauiv1lib.inbox.InboxWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Popup window to show account messages.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.inventory module¶
Provides help related ui.
- class bauiv1lib.inventory.InventoryWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Shows what you got.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.kiosk module¶
UI functionality for running the game in kiosk mode.
- class bauiv1lib.kiosk.KioskWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Kiosk mode window.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.party module¶
Provides party related UI.
bauiv1lib.partyqueue module¶
UI related to waiting in line for a party.
- class bauiv1lib.partyqueue.PartyQueueWindow(queue_id: str, address: str, port: int)[source]¶
Bases:
Window
Window showing players waiting to join a server.
- class Dude(parent: PartyQueueWindow, distance: float, initial_offset: float, is_player: bool, account_id: str, name: str)[source]¶
Bases:
object
Represents a single dude waiting in a server line.
- on_account_press(account_id: str | None, origin_widget: Widget) None [source]¶
A dude was clicked so we should show his account info.
bauiv1lib.play module¶
Provides the top level play window.
- class bauiv1lib.play.PlayWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None, playlist_select_context: PlaylistSelectContext | None = None)[source]¶
Bases:
MainWindow
Window for selecting overall play type.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
- class bauiv1lib.play.PlaylistSelectContext[source]¶
Bases:
object
For using PlayWindow to select a playlist instead of running game.
- back_state: MainWindowState | None = None¶
bauiv1lib.playoptions module¶
Provides a window for configuring play options.
- class bauiv1lib.playoptions.PlayOptionsWindow(*, sessiontype: type[bs.Session], playlist: str, scale_origin: tuple[float, float], delegate: Any = None, playlist_select_context: PlaylistSelectContext | None = None)[source]¶
Bases:
PopupWindow
A popup window for configuring play options.
bauiv1lib.popup module¶
Popup window/menu related functionality.
- class bauiv1lib.popup.PopupMenu(parent: bui.Widget, position: tuple[float, float], choices: Sequence[str], *, current_choice: str | None = None, on_value_change_call: Callable[[str], Any] | None = None, opening_call: Callable[[], Any] | None = None, closing_call: Callable[[], Any] | None = None, width: float = 230.0, maxwidth: float | None = None, scale: float | None = None, choices_disabled: Sequence[str] | None = None, choices_display: Sequence[bui.Lstr] | None = None, button_size: tuple[float, float] = (160.0, 50.0), autoselect: bool = True)[source]¶
Bases:
object
A complete popup-menu control.
This creates a button and wrangles its pop-up menu.
- get_window_widget() Widget | None [source]¶
Return the menu’s window widget (or None if nonexistent).
Called when the menu is closing.
Called when a choice is selected.
- class bauiv1lib.popup.PopupMenuWindow(position: tuple[float, float], choices: Sequence[str], current_choice: str, *, delegate: Any = None, width: float = 230.0, maxwidth: float | None = None, scale: float = 1.0, choices_disabled: Sequence[str] | None = None, choices_display: Sequence[bui.Lstr] | None = None)[source]¶
Bases:
PopupWindow
A menu built using popup-window functionality.
- class bauiv1lib.popup.PopupWindow(position: tuple[float, float], size: tuple[float, float], scale: float = 1.0, *, offset: tuple[float, float] = (0, 0), bg_color: tuple[float, float, float] = (0.35, 0.55, 0.15), focus_position: tuple[float, float] = (0, 0), focus_size: tuple[float, float] | None = None, toolbar_visibility: Literal['inherit', 'menu_minimal_no_back', 'menu_store_no_back'] = 'menu_minimal_no_back', edge_buffer_scale: float = 1.0)[source]¶
Bases:
object
A transient window that positions and scales itself for visibility.
Category: UI Classes
bauiv1lib.purchase module¶
UI related to purchasing items.
bauiv1lib.qrcode module¶
Provides functionality for displaying QR codes.
bauiv1lib.radiogroup module¶
UI functionality for creating radio groups of buttons.
bauiv1lib.report module¶
UI related to reporting bad behavior/etc.
bauiv1lib.resourcetypeinfo module¶
Provides a window which shows info about resource types.
- class bauiv1lib.resourcetypeinfo.ResourceTypeInfoWindow(resource_type: Literal['tickets', 'tokens', 'trophies', 'xp'], origin_widget: bui.Widget)[source]¶
Bases:
PopupWindow
Popup window providing info about resource types.
bauiv1lib.sendinfo module¶
UI functionality for entering promo codes.
- class bauiv1lib.sendinfo.SendInfoWindow(modal: bool = False, legacy_code_mode: bool = False, transition: str | None = 'in_scale', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Window for sending info to the developer.
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
bauiv1lib.serverdialog module¶
Dialog window controlled by the master server.
- class bauiv1lib.serverdialog.ServerDialogData(dialog_id: ~typing.Annotated[str, <efro.dataclassio.IOAttrs object at 0x7fd90590c920>], text: ~typing.Annotated[str, <efro.dataclassio.IOAttrs object at 0x7fd90590cbc0>], subs: ~typing.Annotated[list[tuple[str, str]], <efro.dataclassio.IOAttrs object at 0x7fd90590cb60>] = <factory>, show_cancel: ~typing.Annotated[bool, <efro.dataclassio.IOAttrs object at 0x7fd90590cce0>] = True, copy_text: ~typing.Annotated[str | None, <efro.dataclassio.IOAttrs object at 0x7fd90590ce00>] = None)[source]¶
Bases:
object
Data for ServerDialog.
- copy_text: IOAttrs object at 0x7fd90c94e0c0>] = None¶
- dialog_id: IOAttrs object at 0x7fd90590e600>]¶
- show_cancel: IOAttrs object at 0x7fd90ce85c40>] = True¶
- subs: IOAttrs object at 0x7fd90ce87aa0>]¶
- text: IOAttrs object at 0x7fd90ce9a450>]¶
- class bauiv1lib.serverdialog.ServerDialogWindow(data: ServerDialogData)[source]¶
Bases:
Window
A dialog window driven by the master-server.
bauiv1lib.tabs module¶
UI functionality for creating tab style buttons.
- class bauiv1lib.tabs.Tab(button: Widget, position: tuple[float, float], size: tuple[float, float])[source]¶
Bases:
object
Info for an individual tab in a TabRow
- position: tuple[float, float]¶
- size: tuple[float, float]¶
- class bauiv1lib.tabs.TabRow(parent: bui.Widget, tabdefs: list[tuple[T, bui.Lstr]], pos: tuple[float, float], size: tuple[float, float], *, on_select_call: Callable[[T], None] | None = None)[source]¶
Bases:
Generic
[T
]Encapsulates a row of tab-styled buttons.
Tabs are indexed by id which is an arbitrary user-provided type.
bauiv1lib.teamnamescolors module¶
Provides a window to customize team names and colors.
- class bauiv1lib.teamnamescolors.TeamNamesColorsWindow(scale_origin: tuple[float, float])[source]¶
Bases:
PopupWindow
A popup window for customizing team names and colors.
- color_picker_closing(picker: ColorPicker) None [source]¶
Called when the color picker is closing.
- color_picker_selected_color(picker: ColorPicker, color: Sequence[float]) None [source]¶
Called when a color is selected in the color picker.
bauiv1lib.tournamententry module¶
Defines a popup window for entering tournaments.
- class bauiv1lib.tournamententry.TournamentEntryWindow(tournament_id: str, tournament_activity: bs.Activity | None = None, position: tuple[float, float] = (0.0, 0.0), delegate: Any = None, scale: float | None = None, offset: tuple[float, float] = (0.0, 0.0), on_close_call: Callable[[], Any] | None = None)[source]¶
Bases:
PopupWindow
Popup window for entering tournaments.
bauiv1lib.tournamentscores module¶
Provides a popup for viewing tournament scores.
- class bauiv1lib.tournamentscores.TournamentScoresWindow(tournament_id: str, *, tournament_activity: bs.GameActivity | None = None, position: tuple[float, float] = (0.0, 0.0), scale: float | None = None, offset: tuple[float, float] = (0.0, 0.0), tint_color: Sequence[float] = (1.0, 1.0, 1.0), tint2_color: Sequence[float] = (1.0, 1.0, 1.0), selected_character: str | None = None, on_close_call: Callable[[], Any] | None = None)[source]¶
Bases:
PopupWindow
Window for viewing tournament scores.
bauiv1lib.trophies module¶
Provides a popup window for viewing trophies.
- class bauiv1lib.trophies.TrophiesWindow(position: tuple[float, float], data: dict[str, Any], scale: float | None = None)[source]¶
Bases:
PopupWindow
Popup window for viewing trophies.
bauiv1lib.url module¶
UI functionality related to URLs.
bauiv1lib.v2upgrade module¶
UI for upgrading V1 accounts to V2.
bauiv1lib.watch module¶
Provides UI functionality for watching replays.
- class bauiv1lib.watch.WatchWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]¶
Bases:
MainWindow
Window for watching replays.
- class TabID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
Our available tab types.
- MY_REPLAYS = 'my_replays'¶
- TEST_TAB = 'test_tab'¶
- get_main_window_state() MainWindowState [source]¶
Return a WindowState to recreate this window, if supported.
Module contents¶
Library of stuff using the bauiv1 api: windows, custom controls, etc.