Skip to content

Commit

Permalink
BizHawkClient: Remove run_gui in favor of make_gui (ArchipelagoMW…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zunawe authored Sep 11, 2024
1 parent 8743927 commit c9f1a21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def handle_connection_loss(self, msg: str) -> None:
logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
self._messagebox_connection_loss = self.gui_error(msg, exc_info[1])

def make_gui(self) -> type:
def make_gui(self) -> typing.Type["kvui.GameManager"]:
"""To return the Kivy App class needed for run_gui so it can be overridden before being built"""
from kvui import GameManager

Expand Down
12 changes: 4 additions & 8 deletions worlds/_bizhawk/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,10 @@ def __init__(self, server_address: Optional[str], password: Optional[str]):
self.bizhawk_ctx = BizHawkContext()
self.watcher_timeout = 0.5

def run_gui(self):
from kvui import GameManager

class BizHawkManager(GameManager):
base_title = "Archipelago BizHawk Client"

self.ui = BizHawkManager(self)
self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI")
def make_gui(self):
ui = super().make_gui()
ui.base_title = "Archipelago BizHawk Client"
return ui

def on_package(self, cmd, args):
if cmd == "Connected":
Expand Down

0 comments on commit c9f1a21

Please sign in to comment.