mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
0ed4872ed2
commit
f643c74d21
1 changed files with 9 additions and 4 deletions
|
|
@ -17,6 +17,7 @@ only_empty = False
|
||||||
ClassType = TypeVar('ClassType')
|
ClassType = TypeVar('ClassType')
|
||||||
MethodType = TypeVar('MethodType')
|
MethodType = TypeVar('MethodType')
|
||||||
|
|
||||||
|
|
||||||
def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
|
def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
|
||||||
def decorator(new_method: MethodType) -> MethodType:
|
def decorator(new_method: MethodType) -> MethodType:
|
||||||
method_name = new_method.__code__.co_name
|
method_name = new_method.__code__.co_name
|
||||||
|
|
@ -27,6 +28,8 @@ def override(cls: ClassType) -> Callable[[MethodType], MethodType]:
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
# Enhanced Gather Tab
|
# Enhanced Gather Tab
|
||||||
|
|
||||||
|
|
||||||
class EnhancedPublicGatherTab(PublicGatherTab):
|
class EnhancedPublicGatherTab(PublicGatherTab):
|
||||||
@override(PublicGatherTab)
|
@override(PublicGatherTab)
|
||||||
def _build_join_tab(self, width: float, height: float) -> None:
|
def _build_join_tab(self, width: float, height: float) -> None:
|
||||||
|
|
@ -130,7 +133,8 @@ class EnhancedPublicGatherTab(PublicGatherTab):
|
||||||
def _toggle_refresh(self, _=None) -> None:
|
def _toggle_refresh(self, _=None) -> None:
|
||||||
global is_refreshing
|
global is_refreshing
|
||||||
is_refreshing = not is_refreshing
|
is_refreshing = not is_refreshing
|
||||||
bui.screenmessage(f"Refreshing {'Enabled' if is_refreshing else 'Disabled'}", color=(1, 1, 0))
|
bui.screenmessage(
|
||||||
|
f"Refreshing {'Enabled' if is_refreshing else 'Disabled'}", color=(1, 1, 0))
|
||||||
|
|
||||||
@override(PublicGatherTab)
|
@override(PublicGatherTab)
|
||||||
def _toggle_full(self, _=None) -> None:
|
def _toggle_full(self, _=None) -> None:
|
||||||
|
|
@ -147,7 +151,7 @@ class EnhancedPublicGatherTab(PublicGatherTab):
|
||||||
only_empty = False
|
only_empty = False
|
||||||
bui.screenmessage(f"{'Hiding' if hide_empty else 'Showing'} Empty Parties", color=(1, 1, 0))
|
bui.screenmessage(f"{'Hiding' if hide_empty else 'Showing'} Empty Parties", color=(1, 1, 0))
|
||||||
if hide_empty:
|
if hide_empty:
|
||||||
bui.checkboxwidget(edit=self._only_empty_checkbox, value=only_empty)
|
bui.checkboxwidget(edit=self._only_empty_checkbox, value=only_empty)
|
||||||
self._update_party_rows()
|
self._update_party_rows()
|
||||||
|
|
||||||
@override(PublicGatherTab)
|
@override(PublicGatherTab)
|
||||||
|
|
@ -156,9 +160,10 @@ class EnhancedPublicGatherTab(PublicGatherTab):
|
||||||
only_empty = not only_empty
|
only_empty = not only_empty
|
||||||
if only_empty:
|
if only_empty:
|
||||||
hide_empty = False
|
hide_empty = False
|
||||||
bui.screenmessage(f"{'Showing Only Empty' if only_empty else 'Showing All'} Parties", color=(1, 1, 0))
|
bui.screenmessage(
|
||||||
|
f"{'Showing Only Empty' if only_empty else 'Showing All'} Parties", color=(1, 1, 0))
|
||||||
if only_empty:
|
if only_empty:
|
||||||
bui.checkboxwidget(edit=self._empty_checkbox, value=hide_empty)
|
bui.checkboxwidget(edit=self._empty_checkbox, value=hide_empty)
|
||||||
self._update_party_rows()
|
self._update_party_rows()
|
||||||
|
|
||||||
@override(PublicGatherTab)
|
@override(PublicGatherTab)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue