bauiv1lib.league package

League related UI functionality.

Submodules

bauiv1lib.league.presidency module

Shiny new doc-ui based store.

class bauiv1lib.league.presidency.LeaguePresidencyUIController[source]

Bases: DocUIController

DocUI setup for store.

fulfill_request(request: DocUIRequest) DocUIResponse[source]

Handle request fulfillment.

Expected to be overridden by child classes.

Be aware that this will always be called in a background thread.

This method is expected to always return a response, even in the case of errors. Use error_response() to translate error conditions to responses.

The one exception to this rule (no pun intended) is the efro.error.CleanError exception. This can be raised as a quick and dirty way to show custom error messages. The code raise CleanError('Something broke.') will have the same effect as return self.error_response(custom_message='Something broke.').

local_action(action: DocUILocalAction) None[source]

Do something locally on behalf of the doc-ui.

Controller classes can override this to expose named actions that can be triggered by doc-ui button presses, responses, etc.

Of course controllers can also perform arbitrary local actions alongside their normal request fulfillment; this is simply a way to do so without needing to provide actual ui pages alongside.

Be very careful and focused with what you expose here, especially if your doc-ui pages are coming from untrusted sources. Generally things like launching or joining games are good candidates for local actions.

bauiv1lib.league.rankwindow module

UI related to league rank.

class bauiv1lib.league.rankwindow.LeagueRankWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None, auxiliary_style: bool = True)[source]

Bases: MainWindow

Window for showing league rank.

get_main_window_state() MainWindowState[source]

Return a WindowState to recreate this specific window.

Used to gracefully return to a window from another window or ui system.

main_window_should_preserve_selection() bool[source]

Whether this window should auto-save/restore selection.

If enabled, selection will be stored in the window’s shared state. See get_main_window_shared_state_id() for more info about main-window shared-state.

The default value of None results in a warning to explicitly override this (as the implicit default will change from False to True after api 9 support ends).