Library globals

Class globals . gui . Dialog

View source

Dialog class. Maintains one XML dialog.

SYNOPSIS:
(B) Dialog.new(<dialog-name>);   ... use dialog from $FG_ROOT/gui/dialogs/

(A) Dialog.new(<prop>, <path> [, <dialog-name>]);
... load aircraft specific dialog from
<path> under property <prop> and under
name <dialog-name>; if no name is given,
then it's taken from the XML dialog

prop        ... target node (name must be "dialog")
path        ... file path relative to $FG_ROOT
dialog-name ... dialog <name> of dialog in $FG_ROOT/gui/dialogs/

EXAMPLES:

var dlg = gui.Dialog.new("/sim/gui/dialogs/foo-config/dialog",
"Aircraft/foo/foo_config.xml");
dlg.open();
dlg.close();

var livery_dialog = gui.Dialog.new("livery-select");
livery_dialog.toggle();

Classes

instance

Functions

close

del

is_open

load

doesn't need to be called explicitly, but can be used to force a reload

namespace

allows access to dialog-embedded Nasal variables/functions

new

open

toggle