Skip to content

Commit 90417e0

Browse files
qwintbeauxq
andauthored
CommonClient: Expand on make_gui docstring (#4449)
* adds docstring to make_gui describing what things you might want to change without dealing with kivy/kvui directly (there are better places to document those) * Update CommonClient.py Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com> * Update CommonClient.py Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com> --------- Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
1 parent 96b941e commit 90417e0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CommonClient.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,16 @@ def handle_connection_loss(self, msg: str) -> None:
709709
logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
710710
self._messagebox_connection_loss = self.gui_error(msg, exc_info[1])
711711

712-
def make_gui(self) -> typing.Type["kvui.GameManager"]:
713-
"""To return the Kivy App class needed for run_gui so it can be overridden before being built"""
712+
def make_gui(self) -> "type[kvui.GameManager]":
713+
"""
714+
To return the Kivy `App` class needed for `run_gui` so it can be overridden before being built
715+
716+
Common changes are changing `base_title` to update the window title of the client and
717+
updating `logging_pairs` to automatically make new tabs that can be filled with their respective logger.
718+
719+
ex. `logging_pairs.append(("Foo", "Bar"))`
720+
will add a "Bar" tab which follows the logger returned from `logging.getLogger("Foo")`
721+
"""
714722
from kvui import GameManager
715723

716724
class TextManager(GameManager):

0 commit comments

Comments
 (0)