Add the autovisibility functionality for the menubar.
If /sim/menubar/autovisibility/enabled is true, show the menubar when the mouse hits the upper edge of the window and hide the menubar on click outside a pui element.
This commit is contained in:
parent
e9bb24b8a2
commit
77a77ba6ab
2 changed files with 15 additions and 0 deletions
11
mice.xml
11
mice.xml
|
@ -24,6 +24,17 @@ current mode for each mouse is held in the
|
|||
<constrained type="bool">false</constrained>
|
||||
<pass-through type="bool">true</pass-through>
|
||||
|
||||
<button n="0">
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/sim/menubar/autovisibility/enabled</property>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>//sim/menubar/visibility</property>
|
||||
<value type="bool">false</value>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button n="2">
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
|
|
|
@ -505,6 +505,10 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<menubar>
|
||||
<visibility type="bool" userarchive="y">true</visibility>
|
||||
<default include="gui/menubar.xml"/>
|
||||
<autovisibility>
|
||||
<enabled type="bool" userarchive="y">false</enabled>
|
||||
<edge-size type="int">5</edge-size>
|
||||
</autovisibility>
|
||||
</menubar>
|
||||
|
||||
<gui>
|
||||
|
|
Loading…
Add table
Reference in a new issue