2010-10-07 15:56:24 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
2012-08-07 20:27:29 +00:00
|
|
|
<nasal>
|
|
|
|
<open><![CDATA[
|
|
|
|
var normalize_string = func(src) {
|
|
|
|
if( src == nil ) src = "";
|
|
|
|
var dst = "";
|
|
|
|
for( var i = 0; i < size(src); i+=1 ) {
|
|
|
|
if( src[i] == `\n` or src[i] == `\r` )
|
|
|
|
src[i] = ` `;
|
|
|
|
|
|
|
|
if (i == 0 and src[i] == ` `)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if( i != 0 and src[i] == ` ` and src[i-1] == ` ` )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
dst = dst ~ " ";
|
|
|
|
dst[size(dst)-1] = src[i];
|
|
|
|
}
|
|
|
|
return dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
var GlobalWeatherDialogController = {
|
|
|
|
|
|
|
|
new : func( dlgRoot ) {
|
|
|
|
var obj = { parents: [GlobalWeatherDialogController] };
|
|
|
|
obj.dlgRoot = dlgRoot;
|
|
|
|
obj.base = "sim/gui/dialogs/metar";
|
|
|
|
obj.baseN = props.globals.getNode( obj.base, 1 );
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
},
|
|
|
|
|
|
|
|
refresh : func {
|
|
|
|
|
|
|
|
var scenarioName = getprop( me.base ~ "/source-selection");
|
|
|
|
|
|
|
|
if (getprop( me.base ~ "/mode/manual-weather")) {
|
|
|
|
# In manual weather mode we have to diable live weather
|
|
|
|
# fetch so the weather can be changed by the user in the
|
|
|
|
# weather configuration dialog.
|
|
|
|
setprop( "/environment/params/metar-updates-environment", 0 );
|
|
|
|
setprop( "/environment/realwx/enabled", 0 );
|
|
|
|
setprop( "/environment/config/enabled", 0 );
|
|
|
|
} else if( scenarioName == "Live data" ) {
|
|
|
|
# If we've selected Live Data we need to force
|
|
|
|
# a refresh of the Live Data setting.
|
|
|
|
setprop( "/environment/realwx/enabled", 1 );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
open : func {
|
|
|
|
|
|
|
|
# Determine the weather mode.
|
|
|
|
if ( getprop("/nasal/local_weather/enabled") == 1) {
|
|
|
|
# Local weather mode
|
|
|
|
setprop( me.base ~ "/mode/global-weather", "0" );
|
|
|
|
setprop( me.base ~ "/mode/local-weather", "1" );
|
|
|
|
setprop( me.base ~ "/mode/manual-weather", "0" );
|
|
|
|
} else if ( getprop( "environment/params/metar-updates-environment" ) == 0 ) {
|
|
|
|
# Manual weather mode
|
|
|
|
setprop( me.base ~ "/mode/global-weather", "0" );
|
|
|
|
setprop( me.base ~ "/mode/local-weather", "0" );
|
|
|
|
setprop( me.base ~ "/mode/manual-weather", "1" );
|
|
|
|
} else {
|
|
|
|
# Global weather mode
|
|
|
|
setprop( me.base ~ "/mode/global-weather", "1" );
|
|
|
|
setprop( me.base ~ "/mode/local-weather", "0" );
|
|
|
|
setprop( me.base ~ "/mode/manual-weather", "0" );
|
|
|
|
}
|
|
|
|
|
|
|
|
# initialize the METAR source selection
|
|
|
|
if( getprop( "environment/realwx/enabled" ) ) {
|
|
|
|
setprop( me.base ~ "/source-selection", "Live data" );
|
|
|
|
} else {
|
|
|
|
# preset configured scenario
|
|
|
|
var wsn = props.globals.getNode( "/environment/weather-scenarios" );
|
|
|
|
var found = 0;
|
|
|
|
if( wsn != nil ) {
|
|
|
|
var scenarios = wsn.getChildren("scenario");
|
|
|
|
forindex (var i; scenarios ) {
|
|
|
|
var metarN = scenarios[i].getNode("metar");
|
|
|
|
metarN == nil and continue;
|
|
|
|
if( metarN.getValue() == getprop("/environment/metar/data","") ) {
|
|
|
|
setprop( me.base ~ "/source-selection", scenarios[i].getNode("name").getValue() );
|
|
|
|
found = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( found == 0 )
|
|
|
|
setprop( me.base ~ "/source-selection", "Manual input" );
|
|
|
|
}
|
|
|
|
|
|
|
|
setprop( me.base ~ "/metar-string", normalize_string(getprop("environment/metar/data")) );
|
|
|
|
gui.findElementByName( me.dlgRoot, "metar-string" ).getNode("legend", 1).setValue(normalize_string(getprop("environment/metar/data")));
|
|
|
|
|
|
|
|
# fill the METAR source combo box
|
|
|
|
var combo = gui.findElementByName( me.dlgRoot, "source-selection" );
|
|
|
|
var wsn = props.globals.getNode( "/environment/weather-scenarios" );
|
|
|
|
if( wsn != nil ) {
|
|
|
|
var scenarios = wsn.getChildren("scenario");
|
|
|
|
forindex (var i; scenarios ) {
|
|
|
|
combo.getChild("value", i, 1).setValue(scenarios[i].getNode("name").getValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
me.scenarioListenerId = setlistener( me.base ~ "/source-selection", func(n) { me.scenarioListener(n); }, 1, 1 );
|
|
|
|
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 1 );
|
|
|
|
|
|
|
|
# Update the dialog itself
|
|
|
|
me.refresh();
|
|
|
|
},
|
|
|
|
|
|
|
|
close : func {
|
|
|
|
removelistener( me.scenarioListenerId );
|
|
|
|
removelistener( me.metarListenerId );
|
|
|
|
},
|
|
|
|
|
|
|
|
apply : func {
|
|
|
|
var scenarioName = getprop( me.base ~ "/source-selection");
|
|
|
|
var metar = getprop( "environment/metar/data" );
|
|
|
|
var tile = getprop( me.base ~ "/tile");
|
|
|
|
var global_weather_enabled = getprop( me.base ~ "/mode/global-weather");
|
|
|
|
var local_weather_enabled = getprop( me.base ~ "/mode/local-weather");
|
|
|
|
var manual_weather_enabled = getprop( me.base ~ "/mode/manual-weather");
|
|
|
|
|
|
|
|
# General weather settings based on scenario
|
|
|
|
if (manual_weather_enabled == 1) {
|
|
|
|
setprop( "/environment/params/metar-updates-environment", 0 );
|
|
|
|
setprop( "/environment/realwx/enabled", 0 );
|
|
|
|
setprop( "/environment/config/enabled", 0 );
|
|
|
|
metar = "";
|
|
|
|
} else if( scenarioName == "Live data" ) {
|
|
|
|
setprop( "/environment/params/metar-updates-environment", 1 );
|
|
|
|
setprop( "/environment/realwx/enabled", 1 );
|
|
|
|
setprop( "/environment/config/enabled", 1 );
|
|
|
|
} else if( scenarioName == "Manual input" ) {
|
|
|
|
setprop( "/environment/params/metar-updates-environment", 1 );
|
|
|
|
setprop( "/environment/realwx/enabled", 0 );
|
|
|
|
setprop( "/environment/config/enabled", 1 );
|
|
|
|
metar = getprop( me.base ~ "/metar-string" );
|
|
|
|
} else {
|
|
|
|
setprop( "/environment/params/metar-updates-environment", 1 );
|
|
|
|
setprop( "/environment/realwx/enabled", 0 );
|
|
|
|
setprop( "/environment/config/enabled", 1 );
|
|
|
|
metar = getprop( me.base ~ "/metar-string" );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( metar != nil ) {
|
|
|
|
setprop( "environment/metar/data", normalize_string(metar) );
|
|
|
|
}
|
|
|
|
|
|
|
|
# Clear any local weather that might be running
|
|
|
|
if (getprop("/nasal/local_weather/loaded")) local_weather.clear_all();
|
|
|
|
setprop("/nasal/local_weather/enabled", "false");
|
|
|
|
|
|
|
|
if (local_weather_enabled) {
|
|
|
|
# If Local Weather is enabled, re-initialize with updated
|
|
|
|
# initial tile and tile selection.
|
|
|
|
setprop("/nasal/local_weather/enabled", "true");
|
|
|
|
setprop("/local-weather/tmp/tile-type", tile);
|
|
|
|
|
|
|
|
if ((scenarioName == "Live data" ) or
|
|
|
|
(scenarioName == "Manual input") ) {
|
|
|
|
# If using Live data, or a manually entered METAR string, the
|
|
|
|
# only sensible tile selection mode is "METAR"
|
|
|
|
setprop("/local-weather/tmp/tile-management", "METAR");
|
|
|
|
} else if (tile != "") {
|
|
|
|
# Use Realistic Weather for defined tiles
|
|
|
|
setprop("/local-weather/tmp/tile-management", "realistic weather");
|
|
|
|
} else {
|
|
|
|
# Otherwise repeat the tile
|
|
|
|
setprop("/local-weather/tmp/tile-management", "repeat-tile");
|
|
|
|
}
|
|
|
|
|
|
|
|
# Re-initialize local weather.
|
|
|
|
local_weather.set_tile();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
findScenarioByName : func(name) {
|
|
|
|
var wsn = props.globals.getNode( "/environment/weather-scenarios" );
|
|
|
|
if( wsn != nil ) {
|
|
|
|
var scenarios = wsn.getChildren("scenario");
|
|
|
|
foreach (var scenario; scenarios ) {
|
|
|
|
if( scenario.getNode("name").getValue() == name )
|
|
|
|
return scenario;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil;
|
|
|
|
},
|
|
|
|
|
|
|
|
scenarioListener : func( n ) {
|
|
|
|
description = "";
|
|
|
|
metar = "nil";
|
|
|
|
tile = "";
|
|
|
|
var scenario = me.findScenarioByName( n.getValue() );
|
|
|
|
if( scenario != nil ) {
|
|
|
|
description = normalize_string(scenario.getNode("description", 1 ).getValue());
|
|
|
|
metar = normalize_string(scenario.getNode("metar", 1 ).getValue());
|
|
|
|
tile = normalize_string(scenario.getNode("tile", 1 ).getValue());
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n.getValue() == "Live data") {
|
|
|
|
# Special case - retrieve live data
|
|
|
|
var metar = getprop( "environment/metar/data" );
|
|
|
|
}
|
|
|
|
|
|
|
|
if (n.getValue() == "Manual input") {
|
|
|
|
# Special case - retain current values
|
|
|
|
var metar = getprop( me.base ~ "/metar-string" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setprop(me.base ~ "/description", description );
|
|
|
|
setprop(me.base ~ "/metar-string", metar );
|
|
|
|
setprop(me.base ~ "/tile", tile);
|
|
|
|
me.refresh();
|
|
|
|
},
|
|
|
|
|
|
|
|
metarListener : func( n ) {
|
|
|
|
var metar = getprop("environment/metar/data");
|
|
|
|
if( metar == nil or metar == "" ) metar = "NIL";
|
|
|
|
metar = normalize_string(metar);
|
|
|
|
printlog( "info", "new METAR: " ~ metar );
|
|
|
|
setprop( me.base ~ "/metar-string", metar );
|
|
|
|
gui.dialog_update( "weather-conditions", "metar-string" );
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var controller = GlobalWeatherDialogController.new( cmdarg() );
|
|
|
|
controller.open();
|
|
|
|
]]></open>
|
|
|
|
|
|
|
|
<close><![CDATA[
|
|
|
|
controller.close();
|
|
|
|
]]></close>
|
|
|
|
</nasal>
|
2010-10-07 15:56:24 +00:00
|
|
|
|
|
|
|
<!-- Control the weather -->
|
|
|
|
<name>weather</name>
|
|
|
|
<modal>false</modal>
|
|
|
|
<resizable>false</resizable>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<default-padding>3</default-padding>
|
|
|
|
|
|
|
|
<!-- Title bar with close button -->
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>1</default-padding>
|
|
|
|
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
|
|
|
|
|
|
|
<text>
|
2012-08-07 20:27:29 +00:00
|
|
|
<label>Weather Conditions</label>
|
2010-10-07 15:56:24 +00:00
|
|
|
</text>
|
|
|
|
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend/>
|
|
|
|
<key>Esc</key>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2010-10-07 15:56:24 +00:00
|
|
|
<hrule/>
|
|
|
|
|
|
|
|
<group>
|
2012-08-07 20:27:29 +00:00
|
|
|
<layout>vbox</layout>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<halign>left</halign>
|
|
|
|
<label>Weather Modeling</label>
|
|
|
|
</text>
|
|
|
|
|
2010-10-07 15:56:24 +00:00
|
|
|
<group>
|
2012-08-07 20:27:29 +00:00
|
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
2010-10-07 15:56:24 +00:00
|
|
|
<group>
|
2012-08-07 20:27:29 +00:00
|
|
|
<layout>table</layout>
|
|
|
|
<radio>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<name>simple-weather</name>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/global-weather</property>
|
|
|
|
<live>true</live>
|
|
|
|
<label>Interpret METAR directly</label>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/global-weather</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/local-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controller.refresh();
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
</radio>
|
|
|
|
<radio>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<name>simple-weather</name>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/local-weather</property>
|
|
|
|
<live>true</live>
|
|
|
|
<label>Model overall weather conditions based on METAR</label>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/local-weather</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/global-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controller.refresh();
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
</radio>
|
|
|
|
<button>
|
|
|
|
<row>1</row>
|
|
|
|
<col>2</col>
|
2010-10-07 15:56:24 +00:00
|
|
|
<halign>fill</halign>
|
2012-08-07 20:27:29 +00:00
|
|
|
<stretch>true</stretch>
|
|
|
|
<legend>Advanced Settings...</legend>
|
2011-01-23 11:15:37 +00:00
|
|
|
<enable>
|
2012-08-07 20:27:29 +00:00
|
|
|
<property>sim/gui/dialogs/metar/mode/local-weather</property>
|
|
|
|
<value>1</value>
|
|
|
|
</enable>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-show</command>
|
|
|
|
<dialog-name>local-weather</dialog-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<radio>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<name>simple-weather</name>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<live>true</live>
|
|
|
|
<label>Configure weather manually</label>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/local-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/global-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controller.refresh();
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<row>2</row>
|
|
|
|
<col>2</col>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<legend>Weather Configuration...</legend>
|
2011-01-23 11:15:37 +00:00
|
|
|
<enable>
|
2012-08-07 20:27:29 +00:00
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
</enable>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-show</command>
|
|
|
|
<dialog-name>weather-configuration</dialog-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2010-10-07 15:56:24 +00:00
|
|
|
</group>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
2010-10-07 15:56:24 +00:00
|
|
|
</group>
|
2012-08-07 20:27:29 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
2010-10-07 15:56:24 +00:00
|
|
|
</group>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
|
|
|
<hrule/>
|
2010-10-07 15:56:24 +00:00
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
|
|
|
<group>
|
2012-08-07 20:27:29 +00:00
|
|
|
<layout>table</layout>
|
2010-10-07 15:56:24 +00:00
|
|
|
<text>
|
2012-08-07 20:27:29 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Weather Conditions</label>
|
2010-10-07 15:56:24 +00:00
|
|
|
</text>
|
|
|
|
<combo>
|
2012-08-07 20:27:29 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
2010-10-07 15:56:24 +00:00
|
|
|
<name>source-selection</name>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
2012-08-07 20:27:29 +00:00
|
|
|
<pref-width>400</pref-width>
|
|
|
|
<property>sim/gui/dialogs/metar/source-selection</property>
|
|
|
|
<enable>
|
|
|
|
<equals>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</equals>
|
|
|
|
</enable>
|
2010-10-07 15:56:24 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>source-selection</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
2012-08-07 20:27:29 +00:00
|
|
|
<object-name>metar-string</object-name>
|
2012-01-05 12:52:17 +00:00
|
|
|
</binding>
|
2010-10-07 15:56:24 +00:00
|
|
|
</combo>
|
|
|
|
|
|
|
|
</group>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
2010-10-07 15:56:24 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<text>
|
|
|
|
<label>METAR Data</label>
|
|
|
|
</text>
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
2011-01-23 11:15:37 +00:00
|
|
|
<text>
|
|
|
|
<label>Data is valid</label>
|
|
|
|
</text>
|
2010-10-07 15:56:24 +00:00
|
|
|
<checkbox>
|
|
|
|
<property>/environment/metar/valid</property>
|
2011-01-23 11:15:37 +00:00
|
|
|
<label/>
|
2010-10-07 15:56:24 +00:00
|
|
|
<live>true</live>
|
2011-01-23 11:15:37 +00:00
|
|
|
<enable><false/></enable>
|
2010-10-07 15:56:24 +00:00
|
|
|
</checkbox>
|
|
|
|
</group>
|
|
|
|
|
2011-01-23 11:15:37 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<textbox>
|
2012-08-07 20:27:29 +00:00
|
|
|
<name>metar-string</name>
|
2011-01-23 11:15:37 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
2012-08-07 20:27:29 +00:00
|
|
|
<pref-width>250</pref-width>
|
|
|
|
<pref-height>60</pref-height>
|
2011-01-23 11:15:37 +00:00
|
|
|
<editable>true</editable>
|
|
|
|
<wrap>true</wrap>
|
|
|
|
<live>false</live>
|
2012-08-07 20:27:29 +00:00
|
|
|
<slider>false</slider>
|
|
|
|
<property>sim/gui/dialogs/metar/metar-string</property>
|
2011-01-23 11:15:37 +00:00
|
|
|
<enable>
|
2012-08-07 20:27:29 +00:00
|
|
|
<and>
|
|
|
|
<equals>
|
|
|
|
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
|
|
|
|
<value>0</value>
|
|
|
|
</equals>
|
|
|
|
<equals>
|
|
|
|
<property>sim/gui/dialogs/metar/source-selection</property>
|
|
|
|
<value>Manual input</value>
|
|
|
|
</equals>
|
|
|
|
</and>
|
2011-01-23 11:15:37 +00:00
|
|
|
</enable>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
2012-08-07 20:27:29 +00:00
|
|
|
<object-name>metar-string</object-name>
|
2011-01-23 11:15:37 +00:00
|
|
|
</binding>
|
|
|
|
</textbox>
|
|
|
|
</group>
|
2010-10-07 15:56:24 +00:00
|
|
|
|
2012-08-07 20:27:29 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<text>
|
|
|
|
<label>Description</label>
|
|
|
|
</text>
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
|
|
|
</group>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2012-08-07 20:27:29 +00:00
|
|
|
<textbox>
|
|
|
|
<name>description</name>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<pref-width>250</pref-width>
|
|
|
|
<pref-height>150</pref-height>
|
|
|
|
<slider>0</slider>
|
|
|
|
<editable>false</editable>
|
|
|
|
<wrap>true</wrap>
|
|
|
|
<live>true</live>
|
|
|
|
<property>sim/gui/dialogs/metar/description</property>
|
|
|
|
</textbox>
|
2010-10-07 15:56:24 +00:00
|
|
|
</group>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2012-01-22 17:29:11 +00:00
|
|
|
<group>
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
|
|
|
<layout>hbox</layout>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
2012-01-22 17:29:11 +00:00
|
|
|
<button>
|
2012-08-07 20:27:29 +00:00
|
|
|
<legend>OK</legend>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>metar-string</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controller.apply();
|
|
|
|
</script>
|
|
|
|
</binding>
|
2012-01-22 17:29:11 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2012-08-07 20:27:29 +00:00
|
|
|
|
2012-01-22 17:29:11 +00:00
|
|
|
<button>
|
2012-08-07 20:27:29 +00:00
|
|
|
<legend>Apply</legend>
|
2012-01-22 17:29:11 +00:00
|
|
|
<binding>
|
2012-08-07 20:27:29 +00:00
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>metar-string</object-name>
|
2012-01-22 17:29:11 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2012-08-07 20:27:29 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
controller.apply();
|
|
|
|
</script>
|
2012-01-22 17:29:11 +00:00
|
|
|
</binding>
|
2012-08-07 20:27:29 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Close</legend>
|
|
|
|
<default>true</default>
|
|
|
|
<key>Esc</key>
|
2012-01-22 17:29:11 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
<empty>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
</empty>
|
|
|
|
</group>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2010-10-07 15:56:24 +00:00
|
|
|
</PropertyList>
|