Ballistica Logo

bauiv1lib.gather package

Submodules

bauiv1lib.gather.abouttab module

Defines the about tab in the gather UI.

class bauiv1lib.gather.abouttab.AboutGatherTab(window: GatherWindow)[source]

Bases: GatherTab

The about tab in the gather UI

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

bauiv1lib.gather.manualtab module

Defines the manual tab in the gather UI.

class bauiv1lib.gather.manualtab.ManualGatherTab(window: GatherWindow)[source]

Bases: GatherTab

The manual tab in the gather UI

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

on_deactivate() None[source]

Called when the tab will no longer be the active one.

restore_state() None[source]

Called when the parent window is restoring state.

save_state() None[source]

Called when the parent window is saving state.

class bauiv1lib.gather.manualtab.State(sub_tab: SubTabType = SubTabType.JOIN_BY_ADDRESS)[source]

Bases: object

State saved/restored only while the app is running.

sub_tab: SubTabType = 'join_by_address'
class bauiv1lib.gather.manualtab.SubTabType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Available sub-tabs.

FAVORITES = 'favorites'
JOIN_BY_ADDRESS = 'join_by_address'

bauiv1lib.gather.nearbytab module

Defines the nearby tab in the gather UI.

class bauiv1lib.gather.nearbytab.NearbyGatherTab(window: GatherWindow)[source]

Bases: GatherTab

The nearby tab in the gather UI

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

on_deactivate() None[source]

Called when the tab will no longer be the active one.

class bauiv1lib.gather.nearbytab.NetScanner(tab: GatherTab, scrollwidget: Widget, tab_button: Widget, width: float)[source]

Bases: object

Class for scanning for nearby games (lan, bluetooth, etc).

update() None[source]

(internal)

bauiv1lib.gather.privatetab module

Defines the Private tab in the gather UI.

class bauiv1lib.gather.privatetab.PrivateGatherTab(window: GatherWindow)[source]

Bases: GatherTab

The private tab in the gather UI

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

on_deactivate() None[source]

Called when the tab will no longer be the active one.

restore_state() None[source]

Called when the parent window is restoring state.

save_state() None[source]

Called when the parent window is saving state.

class bauiv1lib.gather.privatetab.State(sub_tab: SubTabType = SubTabType.JOIN)[source]

Bases: object

Our core state that persists while the app is running.

sub_tab: SubTabType = 'join'
class bauiv1lib.gather.privatetab.SubTabType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Available sub-tabs.

HOST = 'host'
JOIN = 'join'

bauiv1lib.gather.publictab module

Defines the public tab in the gather UI.

class bauiv1lib.gather.publictab.AddrFetchThread(call: Callable[[Any], Any])[source]

Bases: Thread

Thread for fetching an address in the bg.

run() None[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class bauiv1lib.gather.publictab.PartyEntry(address: str, index: int, queue: str | None = None, port: int = -1, name: str = '', size: int = -1, size_max: int = -1, claimed: bool = False, ping: float | None = None, ping_interval: float = -1.0, next_ping_time: float = -1.0, ping_attempts: int = 0, ping_responses: int = 0, stats_addr: str | None = None, clean_display_index: int | None = None)[source]

Bases: object

Info about a public party.

address: str
claimed: bool = False
clean_display_index: int | None = None
get_key() str[source]

Return the key used to store this party.

index: int
name: str = ''
next_ping_time: float = -1.0
ping: float | None = None
ping_attempts: int = 0
ping_interval: float = -1.0
ping_responses: int = 0
port: int = -1
queue: str | None = None
size: int = -1
size_max: int = -1
stats_addr: str | None = None
class bauiv1lib.gather.publictab.PingThread(address: str, port: int, call: Callable[[str, int, float | None], int | None])[source]

Bases: Thread

Thread for sending out game pings.

run() None[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class bauiv1lib.gather.publictab.PublicGatherTab(window: GatherWindow)[source]

Bases: GatherTab

The public tab in the gather UI

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

on_deactivate() None[source]

Called when the tab will no longer be the active one.

on_public_party_activate(party: PartyEntry) None[source]

Called when a party is clicked or otherwise activated.

restore_state() None[source]

Called when the parent window is restoring state.

save_state() None[source]

Called when the parent window is saving state.

set_public_party_selection(sel: Selection) None[source]

Set the sel.

class bauiv1lib.gather.publictab.Selection(entry_key: str, component: SelectionComponent)[source]

Bases: object

Describes the currently selected list element.

component: SelectionComponent
entry_key: str
class bauiv1lib.gather.publictab.SelectionComponent(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Describes what part of an entry is selected.

NAME = 'name'
STATS_BUTTON = 'stats_button'
class bauiv1lib.gather.publictab.State(sub_tab: SubTabType = SubTabType.JOIN, parties: list[tuple[str, PartyEntry]] | None = None, next_entry_index: int = 0, filter_value: str = '', have_server_list_response: bool = False, have_valid_server_list: bool = False)[source]

Bases: object

State saved/restored only while the app is running.

filter_value: str = ''
have_server_list_response: bool = False
have_valid_server_list: bool = False
next_entry_index: int = 0
parties: list[tuple[str, PartyEntry]] | None = None
sub_tab: SubTabType = 'join'
class bauiv1lib.gather.publictab.SubTabType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Available sub-tabs.

HOST = 'host'
JOIN = 'join'
class bauiv1lib.gather.publictab.UIRow[source]

Bases: object

Wrangles UI for a row in the party list.

update(index: int, party: PartyEntry, sub_scroll_width: float, sub_scroll_height: float, lineheight: float, columnwidget: Widget, join_text: Widget, filter_text: Widget, existing_selection: Selection | None, tab: PublicGatherTab) None[source]

Update for the given data.

Module contents

Provides UI for inviting/joining friends.

class bauiv1lib.gather.GatherTab(window: GatherWindow)[source]

Bases: object

Defines a tab for use in the gather UI.

on_activate(parent_widget: Widget, tab_button: Widget, region_width: float, region_height: float, region_left: float, region_bottom: float) Widget[source]

Called when the tab becomes the active one.

The tab should create and return a container widget covering the specified region.

on_deactivate() None[source]

Called when the tab will no longer be the active one.

restore_state() None[source]

Called when the parent window is restoring state.

save_state() None[source]

Called when the parent window is saving state.

property window: GatherWindow

The GatherWindow that this tab belongs to.

class bauiv1lib.gather.GatherWindow(transition: str | None = 'in_right', origin_widget: Widget | None = None)[source]

Bases: Window

Window for joining/inviting friends.

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

Bases: Enum

Our available tab types.

ABOUT = 'about'
INTERNET = 'internet'
MANUAL = 'manual'
NEARBY = 'nearby'
PRIVATE = 'private'
playlist_select(origin_widget: Widget) None[source]

Called by the private-hosting tab to select a playlist.