Work on tooltips, mouse-input config.
This commit is contained in:
parent
6fefc775d7
commit
72a1a0047e
5 changed files with 58 additions and 7 deletions
|
@ -48,6 +48,10 @@ var Tooltip = {
|
|||
}
|
||||
});
|
||||
|
||||
# don't do anything with mouse events ourselves
|
||||
me.set("capture-events", 0);
|
||||
me.set("fill", "rgba(255,255,255,0.8)");
|
||||
|
||||
# transparent background
|
||||
me._canvas.setColorBackground(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
|
|
|
@ -524,15 +524,15 @@ var cycleMouseMode = func(node)
|
|||
if (!getprop("/sim/mouse/right-button-mode-cycle-enabled")) {
|
||||
return;
|
||||
}
|
||||
} else if (reason == "key-press") {
|
||||
# ignore alt-tab / ctrl-tab
|
||||
if (getprop('devices/status/keyboard/ctrl') or getprop('devices/status/keyboard/alt')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var modeNode = props.globals.getNode('/devices/status/mice/mouse[0]/mode');
|
||||
var mode = modeNode.getValue() + 1;
|
||||
|
||||
if ((mode == 1) and getprop('/sim/mouse/skip-flight-controls-mode')) {
|
||||
mode +=1;
|
||||
}
|
||||
|
||||
if (mode == 3) mode = 0;
|
||||
modeNode.setIntValue(mode);
|
||||
|
||||
|
|
|
@ -66,12 +66,15 @@
|
|||
<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/gui/click-shows-tooltip</property>
|
||||
<property>/sim/mouse/click-shows-tooltip</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -96,6 +99,40 @@
|
|||
</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>
|
||||
|
||||
</group>
|
||||
|
||||
<nasal>
|
||||
|
|
|
@ -111,6 +111,11 @@ top down before the key bindings are parsed.
|
|||
<name>Ctrl-I</name>
|
||||
<desc>Cycle mouse mode</desc>
|
||||
<binding>
|
||||
|
||||
<condition>
|
||||
<not><property>/devices/status/keyboard/alt</property></not>
|
||||
<not><property>/devices/status/keyboard/ctrl</property></not>
|
||||
</condition>
|
||||
<command>cycle-mouse-mode</command>
|
||||
<reason>key-press</reason>
|
||||
</binding>
|
||||
|
|
|
@ -699,7 +699,12 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<hide-cursor type="bool" userarchive="y">true</hide-cursor>
|
||||
<right-button-mode-cycle-enabled type="bool" userarchive="y">true</right-button-mode-cycle-enabled>
|
||||
<cursor-timeout-sec type="double" userarchive="y">10.0</cursor-timeout-sec>
|
||||
<click-shows-tooltip type="bool">false</click-shows-tooltip>
|
||||
<click-shows-tooltip type="bool" userarchive="y">false</click-shows-tooltip>
|
||||
<tooltip-delay-msec type="int" userarchive="y">-1</tooltip-delay-msec>
|
||||
|
||||
<drag-sensitivity type="double" userarchive="y">1.0</drag-sensitivity>
|
||||
<invert-mouse-wheel type="bool" userarchive="y">false</invert-mouse-wheel>
|
||||
<skip-flight-controls-mode type="bool" userarchive="y">false</skip-flight-controls-mode>
|
||||
</mouse>
|
||||
|
||||
<replay>
|
||||
|
|
Loading…
Add table
Reference in a new issue