- Messages
- 1,749
- Country

Hi everyone,
I am trying to make my three way switch. And I want to show one mode at a time.
I made 3 windows for each gauge. So I have mode1 mode2 and mode3.
And my switch is SWITCH_RMT. here's my code so far. i know how to make
this in the regular hide yoke. But I need help on this.
also can i use only one mode1 window and use three display gauges
on a single window. tell the switch to toggle the three gauges?
What I wrote is to make only one window show up at a time.
But it does not work right.
DG
I am trying to make my three way switch. And I want to show one mode at a time.
I made 3 windows for each gauge. So I have mode1 mode2 and mode3.
And my switch is SWITCH_RMT. here's my code so far. i know how to make
this in the regular hide yoke. But I need help on this.
also can i use only one mode1 window and use three display gauges
on a single window. tell the switch to toggle the three gauges?
What I wrote is to make only one window show up at a time.
But it does not work right.
<part>
<name>SWITCH_RMT</name>
<animation>
<parameter>
<code>50 (L:RMTSWITCH,enum) 50 * +</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<mouse_flags>LeftSingle+RightSingle</mouse_flags>
<callback_code>
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:RMTSWITCH, enum) -- -1 max (>L:RMTSWITCH, enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:RMTSWITCH, enum) ++ 1 min (>L:RMTSWITCH, enum) }
(L:RMTSWITCH,enum) -1 == if{ (>K:MODE1) }
(L:RMTSWITCH,enum) 0 == if{ (>K:MODE2) }
(L:RMTSWITCH,enum) 1 == if{ (>K:MODE3) }
</callback_code>
</mouserect>
</part>
<part>
<name>MODE1</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>MODE2</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>MODE3</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
DG
Last edited: