mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
BizHawkClient: Remove run_gui
in favor of make_gui
(#3910)
This commit is contained in:
@@ -662,7 +662,7 @@ class CommonContext:
|
|||||||
logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
|
logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
|
||||||
self._messagebox_connection_loss = self.gui_error(msg, exc_info[1])
|
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"""
|
"""To return the Kivy App class needed for run_gui so it can be overridden before being built"""
|
||||||
from kvui import GameManager
|
from kvui import GameManager
|
||||||
|
|
||||||
|
@@ -59,14 +59,10 @@ class BizHawkClientContext(CommonContext):
|
|||||||
self.bizhawk_ctx = BizHawkContext()
|
self.bizhawk_ctx = BizHawkContext()
|
||||||
self.watcher_timeout = 0.5
|
self.watcher_timeout = 0.5
|
||||||
|
|
||||||
def run_gui(self):
|
def make_gui(self):
|
||||||
from kvui import GameManager
|
ui = super().make_gui()
|
||||||
|
ui.base_title = "Archipelago BizHawk Client"
|
||||||
class BizHawkManager(GameManager):
|
return ui
|
||||||
base_title = "Archipelago BizHawk Client"
|
|
||||||
|
|
||||||
self.ui = BizHawkManager(self)
|
|
||||||
self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI")
|
|
||||||
|
|
||||||
def on_package(self, cmd, args):
|
def on_package(self, cmd, args):
|
||||||
if cmd == "Connected":
|
if cmd == "Connected":
|
||||||
|
Reference in New Issue
Block a user