|
|
| Line 12: |
Line 12: |
| == The Idea == | | == The Idea == |
| This section lists a bunch of ideas related to supporting Canvas textures for GUI drawing needs, i.e. to render Canvases as textures, but also to increasingly implement parts of the GUI (such as custom widgets) using interactive Canvases with scripted callbacks, the idea is to work around existing GUI/PUI shortcomings by using Canvases to implement custom styles and widgets. | | This section lists a bunch of ideas related to supporting Canvas textures for GUI drawing needs, i.e. to render Canvases as textures, but also to increasingly implement parts of the GUI (such as custom widgets) using interactive Canvases with scripted callbacks, the idea is to work around existing GUI/PUI shortcomings by using Canvases to implement custom styles and widgets. |
|
| |
|
| |
| '''TheTom''': "I haven't done anything with PUI yet, but I think it shouldn't be too hard to place a texture onto a widget."
| |
|
| |
| : '''Hooray''': Agreed, you definitely already completed the hard part (i.e. the canvas subsystem). PLIB's PUI widgets are all derived from "puObject": http://plib.sourceforge.net/pui/index.html#puObject And James' Map dialog demonstrates how to create a new PUI widget and keeping everything OSG compatible: https://gitorious.org/fg/flightgear/blobs/next/src/GUI/MapWidget.cxx His code is an excellent example of code that could be significantly simplified if we could use your canvas instead - because then most of the stuff could be done in Nasal space instead.
| |
|
| |
| :: '''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 | | {{cquote|<nowiki>We |