You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kivy has an inspector that may be worth including in mpf-mc. I followed their example here and was able to get it somewhat working but it looks like it only picks up children in the widget tree down to the DisplayOutput. I wonder if we're doing something in DisplayOutput that prevents it from recognizing the widgets it contains.
If you'd like to try it out you can update MpfMc.displays_initialized to the following:
def displays_initialized(self, *args):
del args
self.validate_machine_config_section('window')
from mpfmc.uix.window import Window
Window.initialize(self)
### add these lines
from kivy.core.window import Window as KivyWindow
from kivy.modules import inspector
inspector.create_inspector(KivyWindow, self)
self.events.post('displays_initialized')
Once your game is running you can press Ctrl-E to toggle the inspector.
I put together a proof of concept here by updating the DisplayOutput class to manage its own children list. It works but I'm not sure if this is safe to do. If you want to try it out I've got the changes on this branch: https://github.com/seanirby/mpf-mc/tree/kivy-inspector
The reason for that is that a display can be attached to multiple display widgets. That is a concept which is missing in kivy. However, I don't think this would hurt. I will try that in my machine later as I use that feature
Kivy has an inspector that may be worth including in mpf-mc. I followed their example here and was able to get it somewhat working but it looks like it only picks up children in the widget tree down to the DisplayOutput. I wonder if we're doing something in DisplayOutput that prevents it from recognizing the widgets it contains.
If you'd like to try it out you can update
MpfMc.displays_initialized
to the following:Once your game is running you can press Ctrl-E to toggle the inspector.
Example
https://ibb.co/T4Shjjy
The text was updated successfully, but these errors were encountered: