euroastar350
Resource contributor
- Messages
- 863
- Country

Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.
By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.


<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>OMI Switch</TooltipText>
<MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelDown' scmp 0 == or
if{ (L:FuelSelectLeft, enum) 50 - 0 max (>L:OMI_Sw, enum) }
(M:Event) 'RightSingle' scmp 0 ==
(M:Event) 'WheelUp' scmp 0 ==
if{ (L:FuelSelectLeft, enum) 50 + 100 min (>L:OMI_Sw, enum) }
</CallbackCode>
</MouseRect>


(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelDown' scmp 0 == or

<MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelDown' scmp 0 == or
if{ (L:FuelSelectLeft, enum) 50 - 0 max (>L:OMI_Sw, enum) }
els{ (L:FuelSelectLeft, enum) 50 + 100 min (>L:OMI_Sw, enum) }
</CallbackCode>



...which works just fine unless you also need to detect and act on a "MiddleSingle" event or some other "MiddleSomething" event.![]()

No problems at all, Tom. Here is one of the most 'extreme' examples I can find:Bill, MiddleSingle works OK in gauge code, is there any problem with this tag in modeldef file?
Tom
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Small Knob</TooltipText>
<MouseFlags>LeftSingle+LeftRelease+RightSingle+RightRelease+MiddleSingle+MiddleRelease+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 == if{ 0x0001FA15 (>L:F1GTNMOUSE, bool)
(L:F1GTN750U1_INNKNOB, number) 5 - (>L:F1GTN750U1_INNKNOB, number)
(L:F1GTN750U1_INNKNOB, number) 99 > if{ 0 (>L:F1GTN750U1_INNKNOB, number) }
(L:F1GTN750U1_INNKNOB, number) 0 < if{ 99 (>L:F1GTN750U1_INNKNOB, number) }
}
(M:Event) 'LeftRelease' scmp 0 == if{ 0x0001FA16 (>L:F1GTNMOUSE, bool) }
(M:Event) 'RightSingle' scmp 0 == if{ 0x0001FA17 (>L:F1GTNMOUSE, bool)
(L:F1GTN750U1_INNKNOB, number) 5 + (>L:F1GTN750U1_INNKNOB, number)
(L:F1GTN750U1_INNKNOB, number) 99 > if{ 0 (>L:F1GTN750U1_INNKNOB, number) }
(L:F1GTN750U1_INNKNOB, number) 0 < if{ 99 (>L:F1GTN750U1_INNKNOB, number) }
}
(M:Event) 'RightRelease' scmp 0 == if{ 0x0001FA18 (>L:F1GTNMOUSE, bool) }
(M:Event) 'MiddleSingle' scmp 0 == if{ 0x0001FA19 (>L:F1GTNMOUSE, bool) }
(M:Event) 'MiddleRelease' scmp 0 == if{ 0x0001FA1A (>L:F1GTNMOUSE, bool) }
(M:Event) 'WheelDown' scmp 0 == if{ 0x0001FA1B (>L:F1GTNMOUSE, bool)
(L:F1GTN750U1_INNKNOB, number) 5 - (>L:F1GTN750U1_INNKNOB, number)
(L:F1GTN750U1_INNKNOB, number) 99 > if{ 0 (>L:F1GTN750U1_INNKNOB, number) }
(L:F1GTN750U1_INNKNOB, number) 0 < if{ 99 (>L:F1GTN750U1_INNKNOB, number) }
}
(M:Event) 'WheelUp' scmp 0 == if{ 0x0001FA1C (>L:F1GTNMOUSE, bool)
(L:F1GTN750U1_INNKNOB, number) 5 + (>L:F1GTN750U1_INNKNOB, number)
(L:F1GTN750U1_INNKNOB, number) 99 > if{ 0 (>L:F1GTN750U1_INNKNOB, number) }
(L:F1GTN750U1_INNKNOB, number) 0 < if{ 99 (>L:F1GTN750U1_INNKNOB, number) }
}
</CallbackCode>
</MouseRect>