1
0
Fork 0

Minor clean-up of weather dialog

- Fix bug when opening weather dialog when in manual mode.
- Move buttons to be opposite the appropriate radio buttons
- Keep buttons visible at all times.
- Update description to account for recent Basic Weather -> ALS integration.
This commit is contained in:
Stuart Buchanan 2013-05-21 20:50:21 +01:00
parent 0857d81ec6
commit 37f3d9b72f

View file

@ -5,8 +5,12 @@
<open>
<![CDATA[
setprop("sim/gui/dialogs/metar/description[1]","Simple and fast weather engine that interprets METAR data directly or a set of manually defined parameters. Recommended for use with Multiplayer.");
setprop("sim/gui/dialogs/metar/description[2]"," Scripted weather engine that gives more detailed and realistic results based on METAR data and a set of predefiend parameters. Use this for Atmospheric Light Scattering.");
setprop("sim/gui/dialogs/metar/description[1]",
"Simple and fast weather engine that interprets METAR data " ~
"directly or a set of manually defined parameters. Recommended for use with Multiplayer.");
setprop("sim/gui/dialogs/metar/description[2]",
"Advanced weather engine that gives more detailed and realistic results based on METAR " ~
"data and a set of predefiend parameters.");
var normalize_string = func(src) {
if( src == nil ) src = "";
@ -67,7 +71,7 @@
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/global-weather", "1" );
setprop( me.base ~ "/mode/local-weather", "0" );
setprop( me.base ~ "/mode/manual-weather", "1" );
} else {
@ -337,12 +341,10 @@
<group>
<layout>hbox</layout>
<halign>left</halign>
<empty>
<stretch>true</stretch>
</empty>
<halign>center</halign>
<group>
<layout>table</layout>
<pref-width>500</pref-width>
<radio>
<row>0</row>
<col>0</col>
@ -350,7 +352,7 @@
<name>simple-weather</name>
<property>sim/gui/dialogs/metar/mode/global-weather</property>
<live>true</live>
<label>Basic Weather (default)</label>
<label>Basic Weather</label>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/metar/mode/global-weather</property>
@ -394,6 +396,27 @@
</script>
</binding>
</checkbox>
<button>
<row>0</row>
<col>3</col>
<halign>center</halign>
<pref-width>170</pref-width>
<legend>Manual Configuration...</legend>
<enable>
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
</enable>
<binding>
<command>dialog-show</command>
<dialog-name>weather-configuration</dialog-name>
</binding>
<!--<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
<value>1</value>
</binding>-->
</button>
</group>
</group>
@ -412,12 +435,11 @@
<group>
<layout>hbox</layout>
<halign>left</halign>
<empty>
<stretch>true</stretch>
</empty>
<halign>center</halign>
<group>
<layout>table</layout>
<pref-width>500</pref-width>
<radio>
<row>0</row>
<col>0</col>
@ -448,6 +470,27 @@
</script>
</binding>
</radio>
<label>
<row>0</row>
<col>2</col>
</label>
<button>
<row>0</row>
<col>3</col>
<halign>right</halign>
<pref-width>170</pref-width>
<legend>Advanced Settings...</legend>
<enable>
<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>
</group>
</group>
@ -466,53 +509,7 @@
<group>
<layout>table</layout>
<button>
<row>0</row>
<col>0</col>
<colspan>3</colspan>
<pref-width>200</pref-width>
<pref-height>40</pref-height>
<halign>center</halign>
<stretch>true</stretch>
<legend>Manual Weather Configuration...</legend>
<visible>
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
</visible>
<enable>
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
</enable>
<binding>
<command>dialog-show</command>
<dialog-name>weather-configuration</dialog-name>
</binding>
<!--<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/metar/mode/manual-weather</property>
<value>1</value>
</binding>-->
</button>
<button>
<row>0</row>
<col>0</col>
<colspan>3</colspan>
<pref-width>200</pref-width>
<pref-height>40</pref-height>
<halign>center</halign>
<stretch>true</stretch>
<legend>Advanced Settings...</legend>
<visible>
<property>sim/gui/dialogs/metar/mode/local-weather</property>
</visible>
<enable>
<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>
</group>
<empty>