- Messages
- 10,057
- Country
-
Hey all,
I am doing a COMS windows (frequencies) which popups up. It is on a timer and disappears after a moment so you do not have to click to close it.
Its terribly sophisticated. I am wondering if I can simplify it.
I would like to add some options. I tried doing some things to keep the timer going, like when you change a Frequency setting, the window continues to stay open, but my efforts didnt work. I would also like to have a 'close' button (small x at the top corner of the popup outline) so that you can clear out the area to see past it.
So... My question is, can I....
* Have a timer
* Have it 'add time' to the timer or do I need a alternate system that clicks in, like 'turn off that' turn on this'?
* Have a kill switch that turns off the timer?
Here is my 'adapted' popup code. Its from the Garmin bootup code I use that Bill Leaming did for me like 10+ years ago. Its the only thing I could get to work. (Yep, I am still bad a code. I bend polys best).
I am doing a COMS windows (frequencies) which popups up. It is on a timer and disappears after a moment so you do not have to click to close it.
Its terribly sophisticated. I am wondering if I can simplify it.
I would like to add some options. I tried doing some things to keep the timer going, like when you change a Frequency setting, the window continues to stay open, but my efforts didnt work. I would also like to have a 'close' button (small x at the top corner of the popup outline) so that you can clear out the area to see past it.
So... My question is, can I....
* Have a timer
* Have it 'add time' to the timer or do I need a alternate system that clicks in, like 'turn off that' turn on this'?
* Have a kill switch that turns off the timer?
Here is my 'adapted' popup code. Its from the Garmin bootup code I use that Bill Leaming did for me like 10+ years ago. Its the only thing I could get to work. (Yep, I am still bad a code. I bend polys best).
Code:
<!-- COMMS SCREEN -->
<!-- Initialize all variables when power is OFF -->
<Element>
<Select>
<Value>
(L:COMMS WAKEUP Switch,bool) 0 == if{
0 (>L:3307COMMS Screen,enum)
0 (>L:3307COMMS Time,enum) }
</Value>
</Select>
</Element>
<!-- Start timer and increment when both battery and avionics are ON -->
<Element>
<Select>
<Value>
(L:COMMS WAKEUP Switch,bool) 1 == (L:3307COMMS Time,enum) 250 <= and
if{ (L:3307COMMS Time,enum) ++ (>L:3307COMMS Time,enum) 1 (>L:3307COMMS Screen,enum) }
</Value>
</Select>
</Element>
<!-- Stop timer after 20 seconds -->
<Element>
<Select>
<Value>
(L:3307COMMS Time,enum) 222 > if{ 0 (>L:3307COMMS Screen,enum) }
</Value>
</Select>
</Element>
<!-- // (L:3307COMMS Time,enum) 222 > if{ 0 (>L:3307COMMS Screen,enum) } -->
<!-- Reset Wakeup when timer is turned off -->
<Element>
<Select>
<Value>
(L:COMMS WAKEUP Switch,bool) 1 ==
(L:3307COMMS Time,enum) 144 > and
if{ 0 (>L:COMMS WAKEUP Switch,bool) }
</Value>
</Select>
</Element>
<!-- While the "bootscreen" variable is ON and battery is ON, display the bootscreen bitmap -->
<Element>
<Visible>(L:3307COMMS Screen,enum) 1 == </Visible>
<Position X="1000" Y="0"/>
<Image Name="RadiosBackground.bmp" ImageSizes="1500,681" Bright="Yes">
</Image>
</Element>