|This article is a stub. You can help the wiki by|
|Note This article needs a few screenshots|
On-screen GUI messages can be rendered in FlightGear using a simple property-based messaging system which is using property listeners and the PUI GUI system.
|Note Canvas event handlign conflicts with PUI event handling in the sense that it takes precedence - there never really was the intention to fix that, because all the people involved in the original discussion ended up agreeing that PUI should be retired ASAP, i.e. it would not be worth the hassle to make PUI<->Canvas event handling work more properly.
it's really not a new thing, and is indeed explicitly mentioned in the Canvas docs - however, most people will be unaware of the back-end (like you say), i.e. the corresponding messages basically being transparent PUI dialogs (IIRC), so that the corresponding limitations apply, without people necessarily being aware of the culprit.
Whatever is written to
/sim/messages/* at runtime is shown on-screen for a few seconds, then moved away. When the next message is written to that node, that is moved on-screen.
Behind the scenes, this works by using a property listener/callback that is triggered whenever the property tree branch is modified.
This system is primarily used by the following features:
- Multiplayer chat messages Chat Menu
- Howto:Define limits
- Failure management (limits.nas)
- Howto:Implement copilot announcements
None of those are hard-coded, those are all going through the property tree and gui.nas, so you can "disable" things there. The higher-level features are limits.nas (or the failure manager) and the tutorial system.
The corresponding code can be found in gui.nas and screen.nas
To change the font size
To disable the system completely, set
/sim/screen/nomap=true to prevent default message mapping - e.g. as a startup option
--prop:/sim/screen/nomap=1 and/or by editing $FG_HOME/Preferences.xml
In addition, there's the tooltip system which is meanwhile using the Canvas 2D rendering API