GUI Messages: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:


The corresponding code can be found in gui.nas and screen.nas
The corresponding code can be found in gui.nas and screen.nas
To disable the system completely,  set <code>/sim/screen/nomap=true</code> to prevent default message mapping - e.g. as a startup option and/or by editing $FG_HOME/Preferences.xml


In addition, there's the tooltip system which is meanwhile using the [[Canvas]] 2D rendering API
In addition, there's the tooltip system which is meanwhile using the [[Canvas]] 2D rendering API

Revision as of 12:59, 2 February 2016

This article is a stub. You can help the wiki by expanding it.
Note  This article needs a few screenshots


FlightGear is using a simple property-based messaging system which can render GUI messages using propoerty listenenrs and the PUI GUI system.

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.

This system is primarily used by the following features:

  • Tutorials
  • Failure management (limits.nas)
  • Copilot announcements
  • ATC

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 disable the system completely, set /sim/screen/nomap=true to prevent default message mapping - e.g. as a startup option and/or by editing $FG_HOME/Preferences.xml

In addition, there's the tooltip system which is meanwhile using the Canvas 2D rendering API