Canvas widgets: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Line 19: Line 19:


:: '''Hooray''': This just occurred to me in another discussion: Once your canvas textures can be used by PUI, we could not just display dynamically created textures using Nasal, but we could even create our own custom GUI/PUI-widgets using your canvas system. I shortly mentioned this here: http://flightgear.org/forums/viewtopic.php?f=49&p=160415#p160410 This is because James mentioned a while ago that he was going to redo the GUI in FlightGear, but he wanted to start out by absorbing PLIB/PUI into SimGear, so that it can be ported to OSG, so that multiscreen/multi-window setups are supported, and so that custom widgets could  be added (tabs, treeviews etc). Basically, this could be dealt with like a traditional/static texture, so that new widgets could be created from Nasal using your Canvas properties. But obviously some GUI-specific update/notification callbacks would need to be registered for the canvas texture, so that PUI may handle certain GUI events (key presses, mouse actions). Looking at the docs, this would require a puObject-wrapper for "active" textures that may respond to GUI events: http://plib.sourceforge.net/pui/index.html
:: '''Hooray''': This just occurred to me in another discussion: Once your canvas textures can be used by PUI, we could not just display dynamically created textures using Nasal, but we could even create our own custom GUI/PUI-widgets using your canvas system. I shortly mentioned this here: http://flightgear.org/forums/viewtopic.php?f=49&p=160415#p160410 This is because James mentioned a while ago that he was going to redo the GUI in FlightGear, but he wanted to start out by absorbing PLIB/PUI into SimGear, so that it can be ported to OSG, so that multiscreen/multi-window setups are supported, and so that custom widgets could  be added (tabs, treeviews etc). Basically, this could be dealt with like a traditional/static texture, so that new widgets could be created from Nasal using your Canvas properties. But obviously some GUI-specific update/notification callbacks would need to be registered for the canvas texture, so that PUI may handle certain GUI events (key presses, mouse actions). Looking at the docs, this would require a puObject-wrapper for "active" textures that may respond to GUI events: http://plib.sourceforge.net/pui/index.html
{{cquote|<nowiki>We
could could allow aircraft dialogs to include custom widgets, although that
might be unwise for other reasons</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg37868.html|title=<nowiki>Re: [Flightgear-devel] Switching from PUI to osgWidget</nowiki>|author=<nowiki>James Turner</nowiki>|date=<nowiki>Tue, 24 Jul 2012 10:36:26 -0700</nowiki>}}</ref>|<nowiki>James Turner</nowiki>}}
<references/>


== The Plan ==
== The Plan ==

Navigation menu