bauiv1lib.league package

League related UI functionality.

bauiv1lib.league.league_display_name(name: str) → str | bui.LangStr[source]

Return a displayable name for a league tier.

name is the raw league id as it arrives from the server. Known tiers resolve to their authored entry; anything else (a tier this build predates, say) degrades honestly to its own untranslated text rather than being silently mistranslated.

Submodules

bauiv1lib.league.presidency module

Doc-ui based league presidency ui.

class bauiv1lib.league.presidency.LeaguePresidencyUIController[source]

Bases: TypedDocUIController[Root | SubmitBid, GetTokens]

DocUI setup for league presidency.

fulfill_route(route: bacommon.docui.routes.classicleaguepresidency.AnyLeaguePresidencyRoute) → DocUIResponse[source]

Handle fulfillment for a route.

The type-safe equivalent of fulfill_request(); the same rules apply (called in a background thread; should always return a response).

fulfill_unrouted_request(request: bacommon.docui.v2.Request, error: str) → DocUIResponse[source]

Handle a request that maps to none of our routes.

The default shows error. Controllers fronting a server should generally forward the request as-is here instead; a server is free to grow pages (or arg values) that older clients have no routes for, and those should keep working.

classmethod get_local_action_type() → type[bacommon.docui.routes.classicleaguepresidency.LeaguePresidencyLocalAction][source]

Return the family class for the local-actions we handle.

Domains with no local-actions can leave this as is and pass typing.Never as their local-action type arg.

classmethod get_route_type() → type[bacommon.docui.routes.classicleaguepresidency.LeaguePresidencyRoute][source]

Return the family class for the routes we handle.

run_local_action(action: bacommon.docui.routes.classicleaguepresidency.AnyLeaguePresidencyLocalAction, context: DocUILocalAction) → None[source]

Do something locally on behalf of the doc-ui.

The type-safe equivalent of local_action(); the same cautions apply. The original action is passed as context for access to the originating widget and window.

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).