- Code: Select all
fgcommand("dialog-close", props.Node.new({"dialog-name": "aicargo-dialog"}));
fgcommand("dialog-show", props.Node.new({"dialog-name": "aicargo-dialog"}));
A text box is updated without any special call just by changing that property value...
- Code: Select all
<text>
<halign>left</halign>
<property>/sim/gui/dialogs/cargo/weight</property>
<live>true</live>
</text>
Why not an input field? The input field is defined like this. Changing the value of the property changed the value of the input field but only on a open and closes command.
- Code: Select all
<input>
<name>weight</name>
<pref-width>60</pref-width>
<halign>fill</halign>
<stretch>true</stretch>
<property>/sim/gui/dialogs/cargo/weight</property>
<binding>
<command>dialog-apply</command>
<object-name>weight</object-name>
</binding>
</input>
<input>
<name>height</name>
<pref-width>60</pref-width>
<halign>fill</halign>
<stretch>true</stretch>
<property>/sim/gui/dialogs/cargo/height</property>
<binding>
<command>dialog-apply</command>
<object-name>height</object-name>
</binding>
</input>