-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CommonClient: allow worlds to change title of run_gui without rewriting it #3297
Conversation
…ted to the normal default so others using it don't have to rewrite everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
updated description to reflect the new design |
treble suggestion 1 Co-authored-by: Aaron Wagener <[email protected]>
treble suggestion 2 Co-authored-by: Aaron Wagener <[email protected]>
treble suggestion 3 Co-authored-by: Doug Hoskisson <[email protected]>
whoops, didn't notice until i pressed the button that one of those wasn't a treble suggestion lol |
I've reran the unit tests on this branch twice, it refuses to work. |
…azy loading regardless of gui_enabled status
per discussion in core-dev discord channel, changed to a method that returns the kivy App and tested with my own apworld that the following works and i can get rid of my build_gui() override def make_gui(self):
ProxyManager = super().make_gui()
ProxyManager.base_title = "Minit Client"
return ProxyManager |
to consider: have make_gui return the class instead of an instance of it so if people want to subclass it they can, seemed to work in light testing but have nothing to commit yet |
retested new format with the following (and no run_gui) ui = super().make_gui()
class MinitApp(ui):
base_title = "Minit Client"
return MinitApp ui = super().make_gui()
ui.base_title = "Minit Client"
return ui |
…ng it (ArchipelagoMW#3297) * moves the title name in CommonContext.run_gui into a parameter defaulted to the normal default so others using it don't have to rewrite everything * Change to using a GameManager attribute instead of a default param * Update CommonClient.py treble suggestion 1 Co-authored-by: Aaron Wagener <[email protected]> * Update CommonClient.py treble suggestion 2 Co-authored-by: Aaron Wagener <[email protected]> * Update CommonClient.py treble suggestion 3 Co-authored-by: Doug Hoskisson <[email protected]> * Use make_gui() instead of a property to push kivy importing back to lazy loading regardless of gui_enabled status * cleanup * almost forgot to type it * change make_gui to be a class so clients can subclass it * clean up code readability --------- Co-authored-by: Aaron Wagener <[email protected]> Co-authored-by: Doug Hoskisson <[email protected]> Co-authored-by: NewSoupVi <[email protected]>
What is this fixing or adding?
moves GameManager to an optional attribute that worlds can update or overwrite as needed
How was this tested?
ran text client with the change, saw no issues,
updated my client to not define run_gui and use
self.ui_manager.base_title = "Minit Client"
in the init instead and ran it, saw no issuesIf this makes graphical changes, please attach screenshots.