Ballistica Logo

bauiv1lib.store package

Submodules

bauiv1lib.store.browser module

UI for browsing the store.

class bauiv1lib.store.browser.StoreBrowserWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None, show_tab: TabID | None = None, minimal_toolbars: bool = False)[source]

Bases: MainWindow

Window for browsing the store.

class TabID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Our available tab types.

CHARACTERS = 'characters'
EXTRAS = 'extras'
ICONS = 'icons'
MAPS = 'maps'
MINIGAMES = 'minigames'
buy(item: str) None[source]

Attempt to purchase the provided item.

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.

update_buttons() None[source]

Update our buttons.

bauiv1lib.store.button module

UI functionality for a button leading to the store.

class bauiv1lib.store.button.StoreButton(parent: bui.Widget, position: Sequence[float], size: Sequence[float], scale: float, *, on_activate_call: Callable[[], Any] | None = None, transition_delay: float | None = None, color: Sequence[float] | None = None, textcolor: Sequence[float] | None = None, show_tickets: bool = False, button_type: str | None = None, sale_scale: float = 1.0)[source]

Bases: object

A button leading to the store.

get_button() Widget[source]

Return the underlying button widget.

set_position(position: Sequence[float]) None[source]

Set the button position.

bauiv1lib.store.item module

UI functionality related to UI items.

bauiv1lib.store.item.instantiate_store_item_display(item_name: str, item: dict[str, Any], parent_widget: bui.Widget, b_pos: tuple[float, float], b_width: float, b_height: float, *, boffs_h: float = 0.0, boffs_h2: float = 0.0, boffs_v2: float = 0, delay: float = 0.0, button: bool = True) None[source]

(internal)

Module contents