Re: [UFO-devel] Events and layered panes
Status: Beta
Brought to you by:
schmidtjf
From: Johannes S. <sch...@us...> - 2005-12-13 17:58:37
|
Am Donnerstag 01 Dezember 2005 18:40 schrieb Andreas Beckermann: [...] > > Just a side note: > > Keep the GUI stuff clearly separated from your game engine stuff or you > > will end up in an unmaintainable, monolithic source tree. > > If the event haven't been processed by the GUI, send it to your game > > engine. > > Is there _any_ relation to the patch or are you just trying to be the > teacher? ;-) The relation is that you definitely have one of the most complex GUI designs I've ever seen. There are easier methods which do not depend on the event dispatching method. You are using several nested layered panes, big widget hierarchies and so on. Layered panes were designed to handle popups and internal frames. And all I can see on the screen shots are a command frame and some text buffers. Now if neither the command frame nor the text frame or other GUI elements processed the event, it should be processed by the game engine. Or you could register event listeners at the internal frame, which is used to display the command frame, and redispatch it to your game widget if none of the buttons did process the event (otherwise it won't bubble up). Both are independent of the way how event dispatching is done and there are surely more solutions to do that. [...] > > I thought of adding a separate event dispatcher (which can be added to > > the display), which chooses to which widget(s) the event is sent. > > Anyway, this may take some time, as I am really busy these days. > > May I read this as a "this patch won't ever make it into official cvs" ? Yes. Probably it is best to override UXContext instead of patching UAbstractContext. Regards, Johannes |