1
0
Fork 0

GUI layout management and a few visual/eye-candy modifications. See

DOCS/README.layout in the base package for details, along with the
modified dialog files.
This commit is contained in:
andy 2004-05-12 15:37:17 +00:00
parent 72777e70cc
commit 54954eb8de
12 changed files with 1204 additions and 1573 deletions

85
Docs/README.layout Normal file
View file

@ -0,0 +1,85 @@
I just commited an implementation of GUI layout management, ported
over from my game project last year*. What this means is that you no
longer need to position your widgets manually in dialogs, and can
instead lay them out in tables and boxes like the pros do. :) I've
redone a few of the dialogs using the new scheme (I'm especially proud
of the autopilot dialog: http://plausible.org/andy/autopilot-new.png),
so you can see what the possibilities look like.
* FWIW, this is almost the last of my useful code from last spring.
Nasal and the Plib vertex splitting code are two other bits that
were useful in isolation. I also had a terrain engine and stencil
shadow implementation, but those weren't really production quality.
Basically, the implementation is a preprocessor on top of the existing
dialog properties, which sets x/y/width/height values based on
constraints. The <group> objects, including the top-level one which
represents the whole dialog, can now have a <layout> property, which
can be "hbox", "vbox", or "table".
The boxes simply lay out their children in order, either top-to-bottom
or left-to-right. The box name comes from Qt and Gtk, but this is
also the same thing that Java calls a "flow layout", or what the Tk
"packer" does. You can set "constraint" properties on the children,
to give the layout manager hints as to how to place the children. For
the boxes, these are:
equal: The box manager makes sure that all the widgets with this
constraint set to true get equal sizes big enough to fit the
largest one. This is very useful for button boxes to make
the "OK" and "Cancel" buttons match, for example.
stretch: Cells with "stretch" set to true get all the extra space,
if any, the box has to allocate. These are useful for
alignment purposes, especially when combined with <empty>
"widgets" (which are ignored by the dialog creation code,
but honored by the layout engine).
The table layout will be a little more familiar to anyone with HTML
experience. Children of tables get the following constraints:
row: The row number containing the upper left corner of the widget.
Table rows are zero-indexed.
col: The column number containing the upper left corner of the widget.
Table columns are zero-indexed.
rowspan: The number of rows spanned by the widget. Defaults to one.
colspan: The number of columns spanned by the widget. Defaults to
one.
Inside of each "cell", regardless of parent layout, there are some
constraints that are used to position the widget within the space
available:
halign: The horizontal alignment. Can be "left", "right",
"center", or "fill" (i.e. stretch to available space).
valign: The vertical alignment. Can be "top", "bottom",
"center", or "fill".
padding: The number of pixels to leave between the edge of the
cell and the widget.
pref-height:
pref-width: Overrides the default preferred size of the widget.
Note that this is the size of the widget only, not the
cell (which includes padding).
Also, the padding values for cells in a group can be set to a default
value with a <default-padding> property on the group widget.
Some will ask why didn't I implement this as part of Pui. The problem
is the pui just isn't set up for it. Not only is there no notion of
"preferred" size for a widget, there isn't anything remote like a
"constraint" system for attaching arbitrary values to widgets. With
the property system, I have that for free (the original code was
written to work with Nasal objects, btw). I can do the layout with
the properties and on the properties, and our existing dialog code
hardly needs to change at all.
Anyway, give it a try and see if I've broken anything. Also, note
that some of these changes *do* modify the visual appearance of the
GUI. I think it looks better, but opinions will no doubt vary. Shout
if you hate it.
And finally, the text alignment doesn't quite look right with current
plib due to some minor rendering bugs. Bug Steve to apply the patch I
submitted a week or so ago. :)
Andy

80
Nasal/autopilot.nas Normal file
View file

@ -0,0 +1,80 @@
##
## These are just GUI helper routines. The autopilot itself is not a
## Nasal module.
##
tagSettings =
{
"hdg-wing" : ["/autopilot/locks/heading", "wing-leveler"],
"hdg-bug" : ["/autopilot/locks/heading", "dg-heading-hold"],
"hdg-true" : ["/autopilot/locks/heading", "true-heading-hold"],
"hdg-nav" : ["/autopilot/locks/heading", "nav1-hold"],
"vel-throttle" : ["/autopilot/locks/speed", "speed-with-throttle"],
"vel-pitch" : ["/autopilot/locks/speed", "speed-with-pitch-trim"],
"alt-vert" : ["/autopilot/locks/altitude", "vertical-speed-hold"],
"alt-pitch" : ["/autopilot/locks/altitude", "pitch-hold"],
"alt-aoa" : ["/autopilot/locks/altitude", "aoa-hold"],
"alt-alt" : ["/autopilot/locks/altitude", "altitude-hold"],
"alt-agl" : ["/autopilot/locks/altitude", "agl-hold"],
"alt-gs" : ["/autopilot/locks/altitude", "gs1-hold"]
};
radioGroups = [["hdg-wing", "hdg-bug", "hdg-true", "hdg-nav"],
["vel-throttle", "vel-pitch"],
["alt-vert", "alt-pitch", "alt-aoa", "alt-alt",
"alt-agl", "alt-gs"]];
# Initialize to get the types of the gui properties correct
INIT = func {
guinode = props.globals.getNode("/autopilot/gui", 1);
foreach(tag; keys(tagSettings)) {
guinode.getNode(tag, 1).setBoolValue(0);
}
}
settimer(INIT, 0);
update = func {
# Suck out the values from the dialog
fgcommand("dialog-apply", props.Node.new());
# Sanitize the radio buttons such that only one is selected. We are
# passed a tag indicating the one that was pressed.
if(size(arg) > 0) {
tag = arg[0];
foreach(group; radioGroups) {
for(i=0; i<size(group); i = i+1) {
if(tag == group[i]) {
if(getprop("/autopilot/gui", tag)) {
# The user just turned it on, turn the rest off...
for(j=0; j<size(group); j=j+1) {
if(j != i) {
setprop("/autopilot/gui", group[j], 0);
}
}
} else {
# The user tried to turn off an active radio
# button. Turn it back on.
setprop("/autopilot/gui", tag, 1);
}
}
}
}
}
# Set the actual output properties for the autopilot system
foreach(tag; keys(tagSettings)) {
setting = tagSettings[tag];
if(getprop("/autopilot/gui", tag)) {
setprop(setting[0], setting[1]);
}
}
if(!getprop("/autopilot/gui/hdg-active")) {
setprop("/autopilot/locks/heading", ""); }
if(!getprop("/autopilot/gui/alt-active")) {
setprop("/autopilot/locks/altitude", ""); }
if(!getprop("/autopilot/gui/vel-active")) {
setprop("/autopilot/locks/speed", ""); }
# Push any changes back to the dialog
fgcommand("dialog-update", props.Node.new());
}

View file

@ -41,7 +41,7 @@ Node = {
#
Node.new = func {
result = wrapNode(_new());
if(size(arg) >= 0 and typeof(arg[0]) == "hash") {
if(size(arg) > 0 and typeof(arg[0]) == "hash") {
result.setValues(arg[0]);
}
return result;

View file

@ -1,60 +1,62 @@
<?xml version="1.0"?>
<PropertyList>
<name>airports</name>
<layout>vbox</layout>
<name>airports</name>
<width>480</width>
<height>480</height>
<modal>true</modal>
<text>
<label>Select an Airport</label>
</text>
<text>
<x>10</x>
<y>450</y>
<label>Select an Airport:</label>
</text>
<!-- The airport list widget appears to have a bug with layout; it
fails to draw within the x/y/width/height it is given. -->
<airport-list>
<pref-width>440</pref-width>
<pref-height>360</pref-height>
<property>/sim/presets/airport-id</property>
</airport-list>
<airport-list>
<x>10</x>
<y>40</y>
<width>440</width>
<height>360</height>
<property>/sim/presets/airport-id</property>
</airport-list>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<empty><stretch>true</stretch></empty>
<button>
<x>100</x>
<y>10</y>
<legend>Select</legend>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/altitude-ft</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
</button>
<button>
<legend>OK</legend>
<equal>true</equal>
<default>true</default>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/altitude-ft</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
</button>
<button>
<x>300</x>
<y>10</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group>
</PropertyList>

View file

@ -1,484 +1,316 @@
<?xml version="1.0"?>
<PropertyList>
<name>autopilot</name>
<layout>vbox</layout>
<name>autopilot</name>
<width>500</width>
<height>580</height>
<modal>false</modal>
<!--
/autopilot/locks/altitude
/autopilot/locks/heading
/autopilot/locks/speed
/autopilot/settings/heading-bug-deg
/autopilot/settings/target-agl-ft
/autopilot/settings/target-altitude-ft
/autopilot/settings/target-aoa-deg
/autopilot/settings/target-pitch-deg
/autopilot/settings/target-speed-kt
/autopilot/settings/true-heading-deg
/autopilot/settings/vertical-speed-fpm
-->
<text>
<x>10</x>
<y>550</y>
<label>AutoPilot Settings</label>
</text>
<text><label>Autopilot Settings</label></text>
<!-- Heading Modes -->
<group>
<layout>hbox</layout>
<group> <!-- Pitch/Altitude -->
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text><label>Heading Control:</label></text>
<empty><stretch>true</stretch></empty>
<checkbox>
<label>Active</label>
<property>/autopilot/gui/hdg-active</property>
<binding>
<command>nasal</command>
<script>autopilot.update()</script>
</binding>
</checkbox>
</group>
<text>
<x>10</x>
<y>510</y>
<label>Heading Modes:</label>
</text>
<group>
<layout>table</layout>
<text>
<label>Wings Level</label>
<halign>right</halign>
<row>0</row><col>0</col>
</text>
<radio>
<row>0</row><col>1</col>
<property>/autopilot/gui/hdg-wing</property>
<binding>
<command>nasal</command>
<script>autopilot.update("hdg-wing")</script>
</binding>
</radio>
<!--
<input>
<name>heading-modes</name>
<x>150</x>
<y>510</y>
<width>150</width>
<height>25</height>
<property>/autopilot/locks/heading</property>
</input>
-->
<text>
<label>Heading Bug</label>
<halign>right</halign>
<row>1</row><col>0</col>
</text>
<radio>
<row>1</row><col>1</col>
<property>/autopilot/gui/hdg-bug</property>
<binding>
<command>nasal</command>
<script>autopilot.update("hdg-bug")</script>
</binding>
</radio>
<input>
<row>1</row><col>2</col>
<name>hdg-bug</name>
<property>/autopilot/settings/heading-bug-deg</property>
</input>
<button>
<x>310</x>
<y>510</y>
<legend>Deactivate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/heading", 1);
node.setValue( "" );
</script>
</binding>
</button>
<text>
<label>True Heading</label>
<halign>right</halign>
<row>2</row><col>0</col>
</text>
<radio>
<row>2</row><col>1</col>
<property>/autopilot/gui/hdg-true</property>
<binding>
<command>nasal</command>
<script>autopilot.update("hdg-true")</script>
</binding>
</radio>
<input>
<row>2</row><col>2</col>
<name>hdg-true</name>
<property>/autopilot/settings/true-heading-deg</property>
</input>
<text>
<x>10</x>
<y>480</y>
<label>Wing Leveler:</label>
</text>
<text>
<label>NAV1 CDI Course</label>
<halign>right</halign>
<row>3</row><col>0</col>
</text>
<radio>
<row>3</row><col>1</col>
<property>/autopilot/gui/hdg-nav</property>
<binding>
<command>nasal</command>
<script>autopilot.update("hdg-nav")</script>
</binding>
</radio>
</group>
<button>
<x>310</x>
<y>480</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/heading", 1);
node.setValue( "wing-leveler" );
</script>
</binding>
</button>
<empty>
<stretch>true</stretch>
<pref-height>28</pref-height>
</empty>
<text>
<x>10</x>
<y>450</y>
<label>Heading Bug:</label>
</text>
<group>
<layout>hbox</layout>
<text><label>Velocity Control:</label></text>
<empty><stretch>true</stretch></empty>
<checkbox>
<label>Active</label>
<property>/autopilot/gui/vel-active</property>
<binding>
<command>nasal</command>
<script>autopilot.update()</script>
</binding>
</checkbox>
</group>
<input>
<name>heading-bug</name>
<x>150</x>
<y>450</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/heading-bug-deg</property>
</input>
<group>
<layout>table</layout>
<text>
<label>Speed with Throttle</label>
<halign>right</halign>
<row>0</row><col>0</col>
</text>
<radio>
<row>0</row><col>1</col>
<property>/autopilot/gui/vel-throttle</property>
<binding>
<command>nasal</command>
<script>autopilot.update("vel-throttle")</script>
</binding>
</radio>
<input>
<row>0</row><col>2</col>
<name>vel-throttle</name>
<property>/autopilot/settings/target-speed-kt</property>
</input>
<button>
<x>310</x>
<y>450</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/heading", 1);
node.setValue( "dg-heading-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<label>Speed with Pitch</label>
<halign>right</halign>
<row>1</row><col>0</col>
</text>
<radio>
<row>1</row><col>1</col>
<property>/autopilot/gui/vel-pitch</property>
<binding>
<command>nasal</command>
<script>autopilot.update("vel-pitch")</script>
</binding>
</radio>
<input>
<row>1</row><col>2</col>
<name>vel-pitch</name>
<property>/autopilot/settings/target-speed-kt</property>
</input>
</group>
</group> <!-- End of Heading/Speed -->
<group> <!-- Pitch/Altitude -->
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text><label>Pitch/Altitude Control:</label></text>
<empty><stretch>true</stretch></empty>
<checkbox>
<label>Active</label>
<property>/autopilot/gui/alt-active</property>
<binding>
<command>nasal</command>
<script>autopilot.update()</script>
</binding>
</checkbox>
</group>
<text>
<x>10</x>
<y>420</y>
<label>True Heading:</label>
</text>
<group>
<layout>table</layout>
<text>
<label>Vertical Speed</label>
<halign>right</halign>
<row>0</row><col>0</col>
</text>
<radio>
<row>0</row><col>1</col>
<property>/autopilot/gui/alt-vert</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-vert")</script>
</binding>
</radio>
<input>
<row>0</row><col>2</col>
<name>alt-vert</name>
<property>/autopilot/settings/vertical-speed-fpm</property>
</input>
<input>
<name>true-heading</name>
<x>150</x>
<y>420</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/true-heading-deg</property>
</input>
<text>
<label>Pitch Hold</label>
<halign>right</halign>
<row>1</row><col>0</col>
</text>
<radio>
<row>1</row><col>1</col>
<property>/autopilot/gui/alt-pitch</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-pitch")</script>
</binding>
</radio>
<input>
<row>1</row><col>2</col>
<name>alt-pitch</name>
<property>/autopilot/settings/target-pitch-deg</property>
</input>
<button>
<x>310</x>
<y>420</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/heading", 1);
node.setValue( "true-heading-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<label>AoA Hold</label>
<halign>right</halign>
<row>2</row><col>0</col>
</text>
<radio>
<row>2</row><col>1</col>
<property>/autopilot/gui/alt-aoa</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-aoa")</script>
</binding>
</radio>
<input>
<row>2</row><col>2</col>
<name>alt-aoa</name>
<property>/autopilot/settings/target-aoa-deg</property>
</input>
<text>
<x>10</x>
<y>390</y>
<label>NAV1 CDI Hold:</label>
</text>
<text>
<label>Altitude Hold</label>
<halign>right</halign>
<row>3</row><col>0</col>
</text>
<radio>
<row>3</row><col>1</col>
<property>/autopilot/gui/alt-alt</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-alt")</script>
</binding>
</radio>
<input>
<row>3</row><col>2</col>
<name>alt-alt</name>
<property>/autopilot/settings/target-altitude-ft</property>
</input>
<button>
<x>310</x>
<y>390</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/heading", 1);
node.setValue( "nav1-hold" );
</script>
</binding>
</button>
<text>
<label>AGL Hold</label>
<halign>right</halign>
<row>4</row><col>0</col>
</text>
<radio>
<row>4</row><col>1</col>
<property>/autopilot/gui/alt-agl</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-agl")</script>
</binding>
</radio>
<input>
<row>4</row><col>2</col>
<name>alt-agl</name>
<property>/autopilot/settings/target-agl-ft</property>
</input>
<!-- Pitch/Alt Modes -->
<text>
<label>NAV1 Glideslope</label>
<halign>right</halign>
<row>5</row><col>0</col>
</text>
<radio>
<row>5</row><col>1</col>
<property>/autopilot/gui/alt-gs</property>
<binding>
<command>nasal</command>
<script>autopilot.update("alt-gs")</script>
</binding>
</radio>
</group>
<text>
<x>10</x>
<y>350</y>
<label>Pitch/Altitude Modes:</label>
</text>
<empty><stretch>true</stretch></empty>
<!--
<input>
<name>pitch-modes</name>
<x>150</x>
<y>350</y>
<width>150</width>
<height>25</height>
<property>/autopilot/locks/heading</property>
</input>
-->
</group> <!-- End of Pitch/Altitude VBox -->
</group>
<button>
<x>310</x>
<y>350</y>
<legend>Deactivate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "" );
</script>
</binding>
</button>
<button>
<legend>OK</legend>
<padding>10</padding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<text>
<x>10</x>
<y>320</y>
<label>Vertical Speed:</label>
</text>
<input>
<name>vertical-speed-fpm</name>
<x>150</x>
<y>320</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/vertical-speed-fpm</property>
</input>
<button>
<x>310</x>
<y>320</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "vertical-speed-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>290</y>
<label>Pitch Hold:</label>
</text>
<input>
<name>pitch-deg</name>
<x>150</x>
<y>290</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/target-pitch-deg</property>
</input>
<button>
<x>310</x>
<y>290</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "pitch-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>260</y>
<label>AOA Hold:</label>
</text>
<input>
<name>aoa-deg</name>
<x>150</x>
<y>260</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/target-aoa-deg</property>
</input>
<button>
<x>310</x>
<y>260</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "aoa-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>230</y>
<label>Altitude Hold:</label>
</text>
<input>
<name>altitude</name>
<x>150</x>
<y>230</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/target-altitude-ft</property>
</input>
<button>
<x>310</x>
<y>230</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "altitude-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>200</y>
<label>AGL Hold:</label>
</text>
<input>
<name>agl</name>
<x>150</x>
<y>200</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/target-agl-ft</property>
</input>
<button>
<x>310</x>
<y>200</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "agl-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>170</y>
<label>NAV1 GS Hold:</label>
</text>
<button>
<x>310</x>
<y>170</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/altitude", 1);
node.setValue( "gs1-hold" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<!-- Velocity Modes -->
<text>
<x>10</x>
<y>130</y>
<label>Velocity Hold:</label>
</text>
<!--
<input>
<name>velocity-modes</name>
<x>150</x>
<y>130</y>
<width>150</width>
<height>25</height>
<property>/autopilot/locks/heading</property>
</input>
-->
<input>
<name>autospeed</name>
<x>150</x>
<y>130</y>
<width>150</width>
<height>25</height>
<property>/autopilot/settings/target-speed-kt</property>
</input>
<button>
<x>310</x>
<y>130</y>
<legend>Deactivate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/speed", 1);
node.setValue( "" );
</script>
</binding>
</button>
<text>
<x>10</x>
<y>100</y>
<label>Speed w/ Throttle:</label>
</text>
<button>
<x>310</x>
<y>100</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/speed", 1);
node.setValue( "speed-with-throttle" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<text>
<x>10</x>
<y>70</y>
<label>Speed w/ Pitch:</label>
</text>
<button>
<x>310</x>
<y>70</y>
<legend>Activate</legend>
<binding>
<command>nasal</command>
<script>
node = props.globals.getNode("/autopilot/locks/speed", 1);
node.setValue( "speed-with-pitch-trim" );
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<!-- Button Group -->
<button>
<x>105</x>
<y>10</y>
<legend>OK</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<button>
<x>205</x>
<y>10</y>
<legend>Apply</legend>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<button>
<x>305</x>
<y>10</y>
<legend>Reset</legend>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>405</x>
<y>10</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</PropertyList>
</PropertyList>

View file

@ -1,38 +1,42 @@
<?xml version="1.0"?>
<PropertyList>
<name>exit</name>
<modal>true</modal>
<layout>vbox</layout>
<name>exit</name>
<width>180</width>
<height>100</height>
<modal>true</modal>
<text>
<label>Exit FlightGear?</label>
</text>
<group>
<layout>hbox</layout>
<halign>fill</halign>
<default-padding>10</default-padding>
<empty><stretch>true</stretch></empty>
<text>
<x>10</x>
<y>70</y>
<label>Exit FlightGear?</label>
</text>
<button>
<legend>Exit</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>exit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<x>10</x>
<y>10</y>
<legend>Exit</legend>
<default>true</default>
<binding>
<command>exit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<x>100</x>
<y>10</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
</PropertyList>
<empty><stretch>true</stretch></empty>
</group>
</PropertyList>

View file

@ -1,168 +1,142 @@
<?xml version="1.0"?>
<PropertyList>
<name>location-in-air</name>
<width>400</width>
<height>400</height>
<name>location-in-air</name>
<layout>vbox</layout>
<text>
<x>10</x>
<y>360</y>
<label>Set New Location</label>
</text>
<text>
<label>Set New Location</label>
</text>
<input>
<x>10</x>
<y>300</y>
<width>200</width>
<height>25</height>
<label>Airport</label>
<property>/sim/presets/airport-id</property>
</input>
<group>
<layout>table</layout>
<input>
<x>10</x>
<y>270</y>
<width>200</width>
<height>25</height>
<label>Runway</label>
<property>/sim/presets/runway</property>
</input>
<text>
<row>0</row><col>0</col>
<halign>right</halign>
<label>Airport</label>
</text>
<input>
<row>0</row><col>1</col>
<property>/sim/presets/airport-id</property>
</input>
<input>
<x>10</x>
<y>240</y>
<width>200</width>
<height>25</height>
<label>VOR</label>
<property>/sim/presets/vor-id</property>
</input>
<text>
<row>1</row><col>0</col>
<halign>right</halign>
<label>Runway</label>
</text>
<input>
<row>1</row><col>1</col>
<property>/sim/presets/runway</property>
</input>
<input>
<x>10</x>
<y>210</y>
<width>200</width>
<height>25</height>
<label>NDB</label>
<property>/sim/presets/ndb-id</property>
</input>
<text>
<row>2</row><col>0</col>
<halign>right</halign>
<label>VOR</label>
</text>
<input>
<row>2</row><col>1</col>
<property>/sim/presets/vor-id</property>
</input>
<input>
<x>10</x>
<y>180</y>
<width>200</width>
<height>25</height>
<label>Fix</label>
<property>/sim/presets/fix</property>
</input>
<text>
<row>3</row><col>0</col>
<halign>right</halign>
<label>NDB</label>
</text>
<input>
<row>3</row><col>1</col>
<property>/sim/presets/ndb-id</property>
</input>
<input>
<x>10</x>
<y>150</y>
<width>200</width>
<height>25</height>
<label>Distance (mi)</label>
<property>/sim/presets/offset-distance</property>
</input>
<text>
<row>4</row><col>0</col>
<halign>right</halign>
<label>Fix</label>
</text>
<input>
<row>4</row><col>1</col>
<property>/sim/presets/fix</property>
</input>
<input>
<x>10</x>
<y>120</y>
<width>200</width>
<height>25</height>
<label>Altitude (ft)</label>
<property>/sim/presets/altitude-ft</property>
</input>
<text>
<row>0</row><col>2</col>
<halign>right</halign>
<label>Distance (mi)</label>
</text>
<input>
<row>0</row><col>3</col>
<property>/sim/presets/offset-distance</property>
</input>
<input>
<x>10</x>
<y>90</y>
<width>200</width>
<height>25</height>
<label>Glidepath (deg)</label>
<property>/sim/presets/glidescope-deg</property>
</input>
<text>
<row>1</row><col>2</col>
<halign>right</halign>
<label>Altitude (ft)</label>
</text>
<input>
<row>1</row><col>3</col>
<property>/sim/presets/altitude-ft</property>
</input>
<input>
<x>10</x>
<y>60</y>
<width>200</width>
<height>25</height>
<label>Airspeed (kt)</label>
<property>/sim/presets/airspeed-kt</property>
</input>
<text>
<row>2</row><col>2</col>
<halign>right</halign>
<label>Glidepath (deg)</label>
</text>
<input>
<row>2</row><col>3</col>
<property>/sim/presets/glidescope-deg</property>
</input>
<!-- Button Box -->
<group>
<x>10</x>
<y>10</y>
<text>
<row>3</row><col>2</col>
<halign>right</halign>
<label>Airspeed (kt)</label>
</text>
<input>
<row>3</row><col>3</col>
<property>/sim/presets/airspeed-kt</property>
</input>
<button>
<x>0</x>
<y>0</y>
<legend>OK</legend>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
</group>
<button>
<x>100</x>
<y>0</y>
<legend>Apply</legend>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
</button>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<button>
<x>200</x>
<y>0</y>
<legend>Reset</legend>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>300</x>
<y>0</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<button>
<legend>OK</legend>
<equal>true</equal>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>

View file

@ -1,165 +1,76 @@
<?xml version="1.0"?>
<PropertyList>
<name>location-on-ground</name>
<width>400</width>
<height>400</height>
<name>location-on-ground</name>
<layout>vbox</layout>
<text>
<label>Set New Location</label>
</text>
<group>
<layout>table</layout>
<halign>center</halign>
<text>
<row>0</row><col>0</col>
<label>Airport:</label>
</text>
<input>
<row>0</row><col>1</col>
<property>/sim/presets/airport-id</property>
</input>
<text>
<row>1</row><col>0</col>
<label>Runway:</label>
</text>
<input>
<row>1</row><col>1</col>
<property>/sim/presets/runway</property>
</input>
</group>
<text>
<x>10</x>
<y>360</y>
<label>Set New Location</label>
</text>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<empty><stretch>true</stretch></empty>
<input>
<x>10</x>
<y>300</y>
<width>200</width>
<height>25</height>
<label>Airport</label>
<property>/sim/presets/airport-id</property>
</input>
<button>
<legend>OK</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>nasal</command>
<script>
setprop("/sim/presets/longitude-deg", -9999);
setprop("/sim/presets/latitude-deg", -9999);
setprop("/sim/presets/altitude-ft", -9999);
setprop("/sim/presets/airspeed-kt", 0);
setprop("/sim/presets/offset-distance", 0);
setprop("/sim/presets/offset-azimuth", 0);
setprop("/sim/presets/glideslope-deg", 0);
setprop("/sim/presets/heading-deg", 0);
</script>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<input>
<x>10</x>
<y>270</y>
<width>200</width>
<height>25</height>
<label>Runway</label>
<property>/sim/presets/runway</property>
</input>
<empty><stretch>true</stretch></empty>
<!-- Button Box -->
<group>
<x>10</x>
<y>10</y>
<button>
<x>0</x>
<y>0</y>
<legend>OK</legend>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/altitude-ft</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/airspeed-kt</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/offset-distance</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/offset-azimuth</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/glideslope-deg</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/heading-deg</property>
<value type="double">0</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<button>
<x>100</x>
<y>0</y>
<legend>Apply</legend>
<binding>
<command>property-assign</command>
<property>/sim/presets/longitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/latitude-deg</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/altitude-ft</property>
<value type="double">-9999</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/airspeed-kt</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/offset-distance</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/offset-azimuth</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/glideslope-deg</property>
<value type="double">0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/sim/presets/heading-deg</property>
<value type="double">0</value>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>presets-commit</command>
</binding>
</button>
<button>
<x>200</x>
<y>0</y>
<legend>Reset</legend>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>300</x>
<y>0</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group>
</PropertyList>

View file

@ -1,428 +1,234 @@
<?xml version="1.0"?>
<PropertyList>
<name>logging</name>
<width>600</width>
<height>420</height>
<modal>false</modal>
<text>
<x>10</x>
<y>390</y>
<label>Logging</label>
</text>
<layout>vbox</layout>
<group>
<x>0</x>
<y>360</y>
<layout>hbox</layout>
<input>
<x>10</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/filename</property>
<label>File</label>
</input>
<text><label>Log File:</label></text>
<input>
<halign>fill</halign>
<stretch>true</stretch>
<property>/logging/log[0]/filename</property>
</input>
<text><label>Interval (ms):</label></text>
<input>
<halign>fill</halign>
<property>/logging/log[0]/interval-ms</property>
</input>
</group>
<checkbox>
<x>260</x>
<y>0</y>
<width>25</width>
<height>25</height>
<group>
<layout>table</layout>
<text>
<row>0</row><col>2</col>
<label>Title</label>
</text>
<text>
<row>0</row><col>3</col>
<label>Property</label>
</text>
<text>
<row>1</row><col>0</col>
<label>1</label>
</text>
<checkbox>
<row>1</row><col>1</col>
<property>/logging/log[0]/entry[0]/enabled</property>
</checkbox>
<input>
<row>1</row><col>2</col>
<halign>fill</halign>
<pref-width>120</pref-width>
<property>/logging/log[0]/entry[0]/title</property>
</input>
<input>
<row>1</row><col>3</col>
<halign>fill</halign>
<pref-width>240</pref-width>
<property>/logging/log[0]/entry[0]/property</property>
</input>
<text>
<row>2</row><col>0</col>
<label>2</label>
</text>
<checkbox>
<row>2</row><col>1</col>
<property>/logging/log[0]/entry[1]/enabled</property>
</checkbox>
<input>
<row>2</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[1]/title</property>
</input>
<input>
<row>2</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[1]/property</property>
</input>
<text>
<row>3</row><col>0</col>
<label>3</label>
</text>
<checkbox>
<row>3</row><col>1</col>
<property>/logging/log[0]/entry[2]/enabled</property>
</checkbox>
<input>
<row>3</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[2]/title</property>
</input>
<input>
<row>3</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[2]/property</property>
</input>
<text>
<row>4</row><col>0</col>
<label>4</label>
</text>
<checkbox>
<row>4</row><col>1</col>
<property>/logging/log[0]/entry[3]/enabled</property>
</checkbox>
<input>
<row>4</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[3]/title</property>
</input>
<input>
<row>4</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[3]/property</property>
</input>
<text>
<row>5</row><col>0</col>
<label>5</label>
</text>
<checkbox>
<row>5</row><col>1</col>
<property>/logging/log[0]/entry[4]/enabled</property>
</checkbox>
<input>
<row>5</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[4]/title</property>
</input>
<input>
<row>5</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[4]/property</property>
</input>
<text>
<row>6</row><col>0</col>
<label>6</label>
</text>
<checkbox>
<row>6</row><col>1</col>
<property>/logging/log[0]/entry[5]/enabled</property>
</checkbox>
<input>
<row>6</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[5]/title</property>
</input>
<input>
<row>6</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[5]/property</property>
</input>
<text>
<row>7</row><col>0</col>
<label>7</label>
</text>
<checkbox>
<row>7</row><col>1</col>
<property>/logging/log[0]/entry[6]/enabled</property>
</checkbox>
<input>
<row>7</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[6]/title</property>
</input>
<input>
<row>7</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[6]/property</property>
</input>
<text>
<row>8</row><col>0</col>
<label>8</label>
</text>
<checkbox>
<row>8</row><col>1</col>
<property>/logging/log[0]/entry[7]/enabled</property>
</checkbox>
<input>
<row>8</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[7]/title</property>
</input>
<input>
<row>8</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[7]/property</property>
</input>
<text>
<row>9</row><col>0</col>
<label>9</label>
</text>
<checkbox>
<row>9</row><col>1</col>
<property>/logging/log[0]/entry[8]/enabled</property>
</checkbox>
<input>
<row>9</row><col>2</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[8]/title</property>
</input>
<input>
<row>9</row><col>3</col>
<halign>fill</halign>
<property>/logging/log[0]/entry[8]/property</property>
</input>
</group>
<checkbox>
<property>/logging/log[0]/enabled</property>
<label>Enabled</label>
</checkbox>
<input>
<x>380</x>
<y>0</y>
<width>100</width>
<height>25</height>
<property>/logging/log[0]/interval-ms</property>
<label>Interval (ms)</label>
</input>
</group>
<label>Logging Enabled</label>
</checkbox>
<group>
<x>0</x>
<y>330</y>
<text>
<x>10</x>
<y>0</y>
<label>Column</label>
</text>
<text>
<x>80</x>
<y>0</y>
<label>Enabled</label>
</text>
<text>
<x>160</x>
<y>0</y>
<label>Title</label>
</text>
<text>
<x>300</x>
<y>0</y>
<label>Property</label>
</text>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<button>
<legend>OK</legend>
<equal>true</equal>
<binding><command>dialog-apply</command></binding>
<binding><command>reinit</command><subsystem>logger</subsystem></binding>
<binding><command>dialog-close</command></binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding><command>dialog-close</command></binding>
</button>
<empty><stretch>true</stretch></empty>
</group>
<group>
<x>0</x>
<y>300</y>
<text>
<x>10</x>
<y>0</y>
<label>1</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[0]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[0]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[0]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>270</y>
<text>
<x>10</x>
<y>0</y>
<label>2</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[1]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[1]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[1]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>240</y>
<text>
<x>10</x>
<y>0</y>
<label>3</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[2]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[2]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[2]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>210</y>
<text>
<x>10</x>
<y>0</y>
<label>4</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[3]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[3]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[3]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>180</y>
<text>
<x>10</x>
<y>0</y>
<label>5</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[4]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[4]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[4]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>150</y>
<text>
<x>10</x>
<y>0</y>
<label>6</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[5]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[5]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[5]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>120</y>
<text>
<x>10</x>
<y>0</y>
<label>7</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[6]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[6]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[6]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>90</y>
<text>
<x>10</x>
<y>0</y>
<label>8</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[7]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[7]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[7]/property</property>
</input>
</group>
<group>
<x>0</x>
<y>60</y>
<text>
<x>10</x>
<y>0</y>
<label>9</label>
</text>
<checkbox>
<x>80</x>
<y>0</y>
<width>25</width>
<height>25</height>
<property>/logging/log[0]/entry[8]/enabled</property>
</checkbox>
<input>
<x>160</x>
<y>0</y>
<width>120</width>
<height>25</height>
<property>/logging/log[0]/entry[8]/title</property>
</input>
<input>
<x>300</x>
<y>0</y>
<width>200</width>
<height>25</height>
<property>/logging/log[0]/entry[8]/property</property>
</input>
</group>
<button>
<x>200</x>
<y>10</y>
<legend>OK</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>reinit</command>
<subsystem>logger</subsystem>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<x>405</x>
<y>10</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</PropertyList>
</PropertyList>

View file

@ -1,105 +1,89 @@
<?xml version="1.0"?>
<PropertyList>
<name>rendering</name>
<modal>false</modal>
<layout>vbox</layout>
<!-- FlightGear rendering options -->
<text>
<label>Rendering Options</label>
</text>
<name>rendering</name>
<width>380</width>
<height>230</height>
<modal>false</modal>
<group>
<layout>vbox</layout>
<halign>center</halign>
<text>
<x>10</x>
<y>200</y>
<label>Rendering Options</label>
</text>
<checkbox>
<halign>left</halign>
<label>Sun/Moon horizon effect</label>
<property>/sim/rendering/horizon-effect</property>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enhanced runway lighting</label>
<property>/sim/rendering/enhanced-lighting</property>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Runway light distance attenuation</label>
<property>/sim/rendering/distance-attenuation</property>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Specular reflections on objects</label>
<property>/sim/rendering/specular-highlight</property>
</checkbox>
</group>
<text>
<x>30</x>
<y>180</y>
<label>(Check an option to enable it.)</label>
</text>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<checkbox>
<x>30</x>
<y>140</y>
<width>20</width>
<height>20</height>
<label>Sun/Moon horizon effect</label>
<property>/sim/rendering/horizon-effect</property>
</checkbox>
<button>
<legend>OK</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<checkbox>
<x>30</x>
<y>110</y>
<width>20</width>
<height>20</height>
<label>Enhanced runway lighting</label>
<property>/sim/rendering/enhanced-lighting</property>
</checkbox>
<empty><stretch>true</stretch></empty>
<checkbox>
<x>30</x>
<y>80</y>
<width>20</width>
<height>20</height>
<label>Runway light distance attenuation</label>
<property>/sim/rendering/distance-attenuation</property>
</checkbox>
<button>
<legend>Apply</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<checkbox>
<x>30</x>
<y>50</y>
<width>20</width>
<height>20</height>
<label>Specular reflections on objects</label>
<property>/sim/rendering/specular-highlight</property>
</checkbox>
<empty><stretch>true</stretch></empty>
<group>
<y>10</y>
<button>
<legend>Reset</legend>
<equal>true</equal>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>10</x>
<y>0</y>
<legend>OK</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<empty><stretch>true</stretch></empty>
<button>
<x>60</x>
<y>0</y>
<legend>Apply</legend>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<button>
<x>140</x>
<y>0</y>
<legend>Reset</legend>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>220</x>
<y>0</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group>
</PropertyList>

View file

@ -1,120 +1,90 @@
<?xml version="1.0"?>
<PropertyList>
<!-- Instant replay control -->
<name>replay</name>
<width>460</width>
<height>380</height>
<modal>false</modal>
<text>
<x>10</x>
<y>350</y>
<label>Instant Replay</label>
</text>
<input>
<x>20</x>
<y>300</y>
<width>125</width>
<height>25</height>
<property>/sim/replay/duration</property>
</input>
<text>
<x>10</x>
<y>270</y>
<label>Replay duration in seconds.</label>
</text>
<text>
<x>10</x>
<y>250</y>
<label>Enter 0 (zero) for replay of whole flight.</label>
</text>
<combo>
<x>20</x>
<y>200</y>
<width>200</width>
<height>25</height>
<property>/sim/replay/view</property>
<value>0</value>
<value>1</value>
<value>4</value>
</combo>
<text>
<x>10</x>
<y>170</y>
<label>Select replay view type:</label>
</text>
<text>
<x>10</x>
<y>145</y>
<label>0 - Cockpit view</label>
</text>
<text>
<x>10</x>
<y>125</y>
<label>1 - Chase view</label>
</text>
<text>
<x>10</x>
<y>105</y>
<label>4 - Tower view</label>
</text>
<text>
<x>10</x>
<y>80</y>
<label>Use v/shift-v to change views during replay,</label>
</text>
<name>replay</name>
<modal>false</modal>
<layout>vbox</layout>
<text>
<x>10</x>
<y>60</y>
<label>and ctrl-v to return to cockpit view following replay.</label>
<label>Instant Replay</label>
</text>
<!-- Header Row -->
<!-- Button Box -->
<group>
<layout>table</layout>
<text>
<row>0</row><col>0</col>
<halign>right</halign>
<label>Duration:</label>
</text>
<input>
<row>0</row><col>1</col>
<halign>left</halign>
<property>/sim/replay/duration</property>
</input>
<text>
<row>1</row><col>0</col>
<halign>right</halign>
<label>View:</label>
</text>
<combo>
<row>1</row><col>1</col>
<halign>left</halign>
<property>/sim/replay/view</property>
<value>0</value>
<value>1</value>
<value>4</value>
</combo>
</group>
<group>
<x>20</x>
<y>10</y>
<!-- Using GUI layout management for text formatting. It ain't
pretty, but it works... Turn off default-padding to pack the
lines together correctly. -->
<group>
<layout>vbox</layout>
<default-padding>0</default-padding>
<padding>6</padding> <!-- padding for the box itself -->
<text><label></label></text> <!-- empty line -->
<text><label>A duration of zero replays the entire flight.</label></text>
<text><label>Replay view types:</label></text>
<group>
<layout>vbox</layout>
<halign>center</halign>
<text><label>0 - Cockpit view</label><halign>left</halign></text>
<text><label>1 - Chase view</label><halign>left</halign></text>
<text><label>4 - Tower view</label><halign>left</halign></text>
</group>
<text><label>Use v/shift-v to change views during replay, and</label></text>
<text><label>ctrl-v to return to cockpit view following replay.</label></text>
<text><label></label></text> <!-- empty line -->
</group>
<button>
<x>0</x>
<y>0</y>
<legend>Replay</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>replay</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<button>
<x>100</x>
<y>0</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<button>
<legend>Replay</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>replay</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group>
</PropertyList>

View file

@ -1,122 +1,105 @@
<?xml version="1.0"?>
<PropertyList>
<name>static-lod</name>
<layout>vbox</layout>
<!-- FlightGear rendering options -->
<text>
<label>Static Scenery Level Of Detail</label>
</text>
<name>static-lod</name>
<width>380</width>
<height>260</height>
<modal>false</modal>
<group>
<layout>table</layout>
<halign>center</halign>
<text>
<x>10</x>
<y>230</y>
<label>Building LOD Ranges</label>
</text>
<text>
<row>0</row><col>1</col>
<label>Max. Range (m)</label>
</text>
<text>
<x>30</x>
<y>190</y>
<label>Detailed up to :</label>
</text>
<text>
<row>1</row><col>0</col>
<halign>right</halign>
<label>Detailed</label>
</text>
<input>
<name>detailed</name>
<x>200</x>
<y>190</y>
<width>100</width>
<height>25</height>
<label>meters</label>
<property>/sim/rendering/static-lod/detailed</property>
</input>
<input>
<row>1</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/detailed</property>
</input>
<text>
<x>30</x>
<y>150</y>
<label>Rough up to (m) :</label>
</text>
<text>
<row>2</row><col>0</col>
<halign>right</halign>
<label>Rough</label>
</text>
<input>
<name>rough</name>
<x>200</x>
<y>150</y>
<width>100</width>
<height>25</height>
<label>meters</label>
<property>/sim/rendering/static-lod/rough</property>
</input>
<input>
<row>2</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/rough</property>
</input>
<text>
<x>30</x>
<y>110</y>
<label>Bare up to (m) :</label>
</text>
<text>
<row>3</row><col>0</col>
<halign>right</halign>
<label>Bare</label>
</text>
<input>
<name>bare</name>
<x>200</x>
<y>110</y>
<width>100</width>
<height>25</height>
<label>meters</label>
<property>/sim/rendering/static-lod/bare</property>
</input>
<input>
<row>3</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/bare</property>
</input>
<text>
<x>20</x>
<y>70</y>
<label>To make this changes permanent,</label>
</text>
<text>
<x>30</x>
<y>50</y>
<label>edit preferences.xml</label>
</text>
</group>
<group>
<y>10</y>
<button>
<x>10</x>
<y>0</y>
<legend>OK</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<button>
<x>60</x>
<y>0</y>
<legend>Apply</legend>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<button>
<x>140</x>
<y>0</y>
<legend>Reset</legend>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<x>220</x>
<y>0</y>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<group>
<layout>vbox</layout>
<default-padding>0</default-padding>
<padding>6</padding>
<text><label>These changes are temporary.</label></text>
<text><label>Permanent settings are in preferences.xml.</label></text>
</group>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<empty><stretch>true</stretch></empty>
<button>
<legend>OK</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
<default>true</default>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Apply</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Reset</legend>
<equal>true</equal>
<binding>
<command>dialog-update</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Cancel</legend>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>