1
0
Fork 0

GUI clean up from Michael HABARTA. Part 1

This commit is contained in:
Stuart Buchanan 2015-03-14 22:33:05 +00:00
parent abe0d5842f
commit 9f0a780279
4 changed files with 81 additions and 55 deletions

View file

@ -252,7 +252,7 @@
</button>
<button>
<legend>Take screen shot</legend>
<legend>Take Screenshot</legend>
<equal>true</equal>
<default>false</default>
<binding>

View file

@ -434,8 +434,8 @@
<halign>fill</halign>
<stretch>true</stretch>
<pref-width>260</pref-width>
<pref-height>60</pref-height>
<slider>1</slider>
<pref-height>70</pref-height>
<slider>15</slider>
<editable>false</editable>
<wrap>true</wrap>
<live>true</live>

View file

@ -8,10 +8,6 @@
<default-padding>1</default-padding>
<color>
<red type="float">0.41</red>
<green type="float">0.4</green>
<blue type="float">0.42</blue>
<alpha type="float">1.0</alpha>
<alpha type="float">1.0</alpha>
</color>
@ -132,8 +128,9 @@
c.getNode("red", 1).setValue(0.2);
c.getNode("green", 1).setValue(1.0);
c.getNode("blue", 1).setValue(0.2);
# Now create an yellow version for when the condition
# Now create an amber version for when the condition
# is not met.
t = table.getChild("text", txtcount, 1);
txtcount += 1;
@ -154,8 +151,8 @@
c = t.getNode("color", 1);
c.getNode("red", 1).setValue(1.0);
c.getNode("green", 1).setValue(1.0);
c.getNode("blue", 1).setValue(0.2);
c.getNode("green", 1).setValue(0.7);
c.getNode("blue", 1).setValue(0.2);
vis = t.getNode("visible", 1).getNode("not", 1);
props.copy(condition, vis);
@ -271,9 +268,6 @@
var setTransparency = func(updateDialog){
var alpha = (getprop("/sim/gui/dialogs/checklist/transparent") or 0);
dlgRoot.getNode("color/alpha").setValue(1-alpha*0.3);
dlgRoot.getNode("color/red").setValue(0.41-alpha*0.2);
dlgRoot.getNode("color/green").setValue(0.4-alpha*0.2);
dlgRoot.getNode("color/blue").setValue(0.42-alpha*0.2);
var n = props.Node.new({ "dialog-name": "checklist" });
if (updateDialog)
{
@ -299,7 +293,7 @@
<label>Aircraft Checklists</label>
</text>
<empty><stretch>1</stretch></empty>
<empty><stretch>true</stretch></empty>
<button>
<pref-width>16</pref-width>
@ -318,6 +312,12 @@
<group>
<layout>hbox</layout>
<!-- gap to left border -->
<text>
<halign>right</halign>
<label> </label>
</text>
<text>
<halign>right</halign>
<label>Checklist:</label>
@ -327,7 +327,7 @@
<name>checklist-combo</name>
<property>/sim/gui/dialogs/checklist/selected-checklist</property>
<editable>false</editable>
<pref-width>200</pref-width>
<pref-width>230</pref-width>
<halign>fill</halign>
<binding>
<command>dialog-apply</command>
@ -350,9 +350,14 @@
<empty><stretch>true</stretch></empty>
<!-- gap to next element -->
<text>
<halign>right</halign>
<label> </label>
</text>
<checkbox>
<label>Transparent</label>
<pref-width>100</pref-width>
<label> Transparent</label>
<property>/sim/gui/dialogs/checklist/transparent</property>
<live>true</live>
<halign>right</halign>
@ -366,6 +371,7 @@
<command>nasal</command>
<script>setTransparency(1);</script>
</binding>
<halign>right</halign>
</checkbox>
</group>
@ -379,7 +385,7 @@
</group>
<group>
<default-padding>4</default-padding>
<default-padding>5</default-padding>
<halign>fill</halign>
<layout>hbox</layout>

View file

@ -7,55 +7,75 @@
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<empty><stretch>1</stretch></empty>
<text>
<label>Cockpit View Options</label>
</text>
<empty><stretch>1</stretch></empty>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<checkbox>
<halign>left</halign>
<label>Enable dynamic cockpit view</label>
<property>/sim/current-view/dynamic-view</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<group>
<layout>hbox</layout>
<checkbox>
<halign>left</halign>
<label>Enable view movement due to G-force</label>
<property>/sim/rendering/headshake/enabled</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<checkbox>
<halign>left</halign>
<label>Enable Blackout and Redout due to G-force</label>
<property>/sim/rendering/redout/enabled</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Enable dynamic Cockpit View</label>
<property>/sim/current-view/dynamic-view</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable View Movement due to G-Force</label>
<property>/sim/rendering/headshake/enabled</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable Blackout and Redout due to G-Force</label>
<property>/sim/rendering/redout/enabled</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
</group>
<hrule/>