Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
6ce750d1ea
8 changed files with 190 additions and 175 deletions
|
@ -118,7 +118,7 @@ var Tooltip = {
|
|||
{
|
||||
var msg = me._label;
|
||||
if (me._property != nil) {
|
||||
var val = me._remapValue(me._property.getValue());
|
||||
var val = me._remapValue(me._property.getValue() or 0);
|
||||
msg = sprintf(me._label, val);
|
||||
}
|
||||
|
||||
|
|
|
@ -549,6 +549,10 @@ var cycleMouseMode = func(node)
|
|||
if (getprop('/sim/view-name-popup') == 0)
|
||||
return;
|
||||
|
||||
# some people like popups but strongly object to this one. As you wish.
|
||||
if (getprop('/sim/mouse/cycle-mode-popup') == 0)
|
||||
return;
|
||||
|
||||
if (mode == 0) {
|
||||
fgcommand("clear-message", props.Node.new({ "id":"mouse-mode" }));
|
||||
return;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<snap-shot>Screenshot </snap-shot>
|
||||
<snap-shot-dir>Screenshot Directory</snap-shot-dir>
|
||||
<sound-config>Sound Configuration</sound-config>
|
||||
<input-config>Input Configuration</input-config>
|
||||
<exit>Quit </exit>
|
||||
|
||||
<!-- View menu -->
|
||||
|
|
141
gui/dialogs/input-config.xml
Normal file
141
gui/dialogs/input-config.xml
Normal file
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>input-config</name>
|
||||
|
||||
<nasal>
|
||||
<open>
|
||||
var syncRadioState = func()
|
||||
{
|
||||
var cycle = getprop("/sim/mouse/right-button-mode-cycle-enabled");
|
||||
setprop("/sim/gui/dialogs/input-config/right-mouse-look", !cycle);
|
||||
setprop("/sim/gui/dialogs/input-config/right-mouse-cycle", cycle);
|
||||
}
|
||||
|
||||
var rightMouseMode = func(newMode)
|
||||
{
|
||||
var doCycle = (newMode == "cycle");
|
||||
setprop("/sim/mouse/right-button-mode-cycle-enabled", doCycle);
|
||||
syncRadioState();
|
||||
}
|
||||
|
||||
syncRadioState();
|
||||
</open>
|
||||
</nasal>
|
||||
|
||||
<modal>false</modal>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<text>
|
||||
<label>Input Options</label>
|
||||
</text>
|
||||
|
||||
<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>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<halign>center</halign>
|
||||
<valign>top</valign>
|
||||
|
||||
<layout>table</layout>
|
||||
|
||||
<group>
|
||||
<pref-width>600</pref-width>
|
||||
<row>0</row>
|
||||
<col>0</col>
|
||||
<colspan>2</colspan>
|
||||
|
||||
<layout>vbox</layout>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Pressing TAB cycles the mouse between different behaviours - normal, flight-controls and look.</label>
|
||||
</text>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>The right-mouse button can be used in two different ways:</label>
|
||||
</text>
|
||||
</group>
|
||||
|
||||
|
||||
<text>
|
||||
<label>Press and hold right mouse to look around</label>
|
||||
<halign>right</halign>
|
||||
<row>1</row>
|
||||
<col>0</col>
|
||||
</text>
|
||||
<radio>
|
||||
<row>1</row>
|
||||
<col>1</col>
|
||||
<property>/sim/gui/dialogs/input-config/right-mouse-look</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>rightMouseMode("look")</script>
|
||||
</binding>
|
||||
</radio>
|
||||
|
||||
<text>
|
||||
<label>Click right mouse to cycle mouse behvaiour</label>
|
||||
<halign>right</halign>
|
||||
<row>2</row>
|
||||
<col>0</col>
|
||||
</text>
|
||||
<radio>
|
||||
<row>2</row>
|
||||
<col>1</col>
|
||||
<property>/sim/gui/dialogs/input-config/right-mouse-cycle</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>rightMouseMode("cycle")</script>
|
||||
</binding>
|
||||
</radio>
|
||||
|
||||
<checkbox>
|
||||
<row>3</row>
|
||||
<col>0</col>
|
||||
<colspan>2</colspan>
|
||||
<halign>left</halign>
|
||||
<label>Disable flight-controls via mouse</label>
|
||||
<property>/sim/mouse/skip-flight-controls-mode</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<button>
|
||||
<legend>Close</legend>
|
||||
<default>true</default>
|
||||
<key>Esc</key>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
</PropertyList>
|
|
@ -1,161 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- Interface / interfaction configuration dialog-->
|
||||
|
||||
<PropertyList>
|
||||
<name>interface-dialog</name>
|
||||
<modal>false</modal>
|
||||
<width>400</width>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<text>
|
||||
<label>Interface Configuration</label>
|
||||
</text>
|
||||
|
||||
<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>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>table</layout>
|
||||
<halign>center</halign>
|
||||
|
||||
<text>
|
||||
<row>0</row>
|
||||
<col>0</col>
|
||||
<label>Tooltips</label>
|
||||
<padding>10</padding>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<row>0</row>
|
||||
<col>1</col>
|
||||
<property>/sim/gui/tooltips-enabled</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
var enabled = getprop('/sim/gui/tooltips-enabled');
|
||||
# set delay to negative to disable tooltips
|
||||
var delay = enabled ? 1000 : -1;
|
||||
setprop('/sim/mouse/tooltip-delay-msec', delay);
|
||||
</script>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<text>
|
||||
<row>1</row>
|
||||
<col>0</col>
|
||||
<label>Tooltip on press</label>
|
||||
<padding>10</padding>
|
||||
<enable>
|
||||
<property>/sim/gui/tooltips-enabled</property>
|
||||
</enable>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<row>1</row>
|
||||
<col>1</col>
|
||||
<property>/sim/mouse/click-shows-tooltip</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<enable>
|
||||
<property>/sim/gui/tooltips-enabled</property>
|
||||
</enable>
|
||||
</checkbox>
|
||||
|
||||
<text>
|
||||
<row>2</row>
|
||||
<col>0</col>
|
||||
<label>Right-click cycles mouse mode</label>
|
||||
<padding>10</padding>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<row>2</row>
|
||||
<col>1</col>
|
||||
<property>/sim/mouse/right-button-mode-cycle-enabled</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
|
||||
<text>
|
||||
<row>3</row>
|
||||
<col>0</col>
|
||||
<label>Knob/slider drag sensitivity</label>
|
||||
<padding>10</padding>
|
||||
</text>
|
||||
|
||||
<input>
|
||||
<row>3</row>
|
||||
<col>1</col>
|
||||
<property>/sim/mouse/drag-sensitivity</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</input>
|
||||
|
||||
<text>
|
||||
<row>4</row>
|
||||
<col>0</col>
|
||||
<label>Invert mouse-wheel on knobs/sliders</label>
|
||||
<padding>10</padding>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<row>4</row>
|
||||
<col>1</col>
|
||||
<property>/sim/mouse/invert-mouse-wheel</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
|
||||
<text>
|
||||
<row>5</row>
|
||||
<col>0</col>
|
||||
<label>Disable mouse flight-controls mode</label>
|
||||
<padding>10</padding>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<row>5</row>
|
||||
<col>1</col>
|
||||
<property>/sim/mouse/skip-flight-controls-mode</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
</group>
|
||||
|
||||
<nasal>
|
||||
<open><![CDATA[
|
||||
|
||||
|
||||
]]></open>
|
||||
</nasal>
|
||||
|
||||
</PropertyList>
|
|
@ -149,13 +149,42 @@
|
|||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Show view name popup</label>
|
||||
<label>Show popup messages</label>
|
||||
<!-- generalising this property for all popups -->
|
||||
<property>/sim/view-name-popup</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Show popup when cycling mouse behaviour</label>
|
||||
<property>/sim/mouse/cycle-mode-popup</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<enable>/sim/view-name-popup</enable>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Show tooltips</label>
|
||||
<property>/sim/mouse/tooltips-enabled</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Show tooltip on mouse press</label>
|
||||
<property>/sim/mouse/click-shows-tooltip</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<halign>left</halign>
|
||||
<label>Show 2D panel</label>
|
||||
|
|
|
@ -59,6 +59,14 @@
|
|||
<enabled>false</enabled>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<name>input-config</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>input-config</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<name>terrasync</name>
|
||||
<binding>
|
||||
|
@ -690,15 +698,6 @@
|
|||
<enabled>false</enabled>
|
||||
</item>
|
||||
|
||||
|
||||
<item>
|
||||
<name>interface-config</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>interface-dialog</dialog-name>
|
||||
</binding>
|
||||
<enabled>true</enabled>
|
||||
</item>
|
||||
</menu>
|
||||
|
||||
<menu>
|
||||
|
|
|
@ -699,10 +699,12 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
|
||||
<mouse>
|
||||
<hide-cursor type="bool" userarchive="y">true</hide-cursor>
|
||||
<right-button-mode-cycle-enabled type="bool" userarchive="y">true</right-button-mode-cycle-enabled>
|
||||
<right-button-mode-cycle-enabled type="bool" userarchive="y">false</right-button-mode-cycle-enabled>
|
||||
<cycle-mode-popup type="bool" userarchive="y">true</cycle-mode-popup>
|
||||
<cursor-timeout-sec type="double" userarchive="y">10.0</cursor-timeout-sec>
|
||||
<click-shows-tooltip type="bool" userarchive="y">false</click-shows-tooltip>
|
||||
<tooltip-delay-msec type="int" userarchive="y">-1</tooltip-delay-msec>
|
||||
<click-shows-tooltip type="bool" userarchive="y">true</click-shows-tooltip>
|
||||
<tooltip-delay-msec type="int" userarchive="y">800</tooltip-delay-msec>
|
||||
<tooltips-enabled type="bool" userarchive="y">true</tooltips-enabled>
|
||||
|
||||
<drag-sensitivity type="double" userarchive="y">1.0</drag-sensitivity>
|
||||
<invert-mouse-wheel type="bool" userarchive="y">false</invert-mouse-wheel>
|
||||
|
|
Loading…
Add table
Reference in a new issue