20,741
edits
Line 31: | Line 31: | ||
'''Canvas System''' | '''Canvas System''' | ||
The fully scriptable [[Canvas]] 2D drawing system in FlightGear 3.0 has now support for: | The fully scriptable [[Canvas]] 2D drawing system in FlightGear 3.0 has now support for: | ||
* creating GUI windows (not just widgets, but also windows - which can be used for popup menus or menubars) | * creating GUI windows (not just widgets, but also windows - which can be used for popup menus or menubars) | ||
* native copy/paste via 2 new [[Nasal]] extension functions, see [[ Howto:Clipboard access using Nasal]] | * native copy/paste via 2 new [[Nasal]] extension functions, see [[ Howto:Clipboard access using Nasal]] | ||
* nested canvases | * nested canvases, where a canvas may contain images created by another canvas texture | ||
* window stacking | * window stacking | ||
* raster images | * raster images | ||
* handling GUI events using osgGA | |||
Support for nested canvases will make it possible to also load canvas textures into other canvases, so that you can, for example, easily load an instrument into a GUI dialog, or even use GUI widgets in MFD instruments, which is a feature based on real avionics, i.e. as used in modern airliners like the A320 or the 787. | |||
Nested canvases also make it possible for people to easily implement GUI tools using the Canvas system, for example a GUI instrument or panel editor can be entirely implemented in scripting space now, without touching any C++ code. Similarly, GUI widgets could also be created in a WYSIWYG-fashion, too - so that even dialog editor or full GUI builders can be built using the Canvas system. | |||
In addition, Tom has also implemented support for window stacking in 08/2012. Check out the demo video below, which demonstrates how "nested" canvases and window stacking works: | |||
{{#ev:youtube|llVaasTEf44}} | |||
Missing features, and features currently under development, are listed at [[Canvas Widgets#Missing_.2F_Todo|Missing Canvas Features]] | |||