kxgames / glooey

An object-oriented GUI library for pyglet.
MIT License
91 stars 6 forks source link

Detaching a GUI from the window #33

Closed UplinkPhobia closed 5 years ago

UplinkPhobia commented 5 years ago

Hello,

I am in a situation where I'd like to have a GUI ready (so with widgets, a window, etc) but completely disabled (read: no drawing, no event handling, and no updating).

I tried a few things but couldn't find a way to do that (I didn't try overriding all handlers or so, which could probably work but is not really a clean approach I believe), so I'm wondering if it is possible?

kalekundert commented 5 years ago

I'm not totally sure I understand what you're asking, but you can create a whole widget hierarchy and just not attach it to the Gui widget until you want it to appear. Would that do what you want?

UplinkPhobia commented 5 years ago

Indeed, I guess it would. I feel a bit dumb for not thinking about it. Thank you nonetheless