- Messages
- 10,163
- Country

Hey all,
I would like to know if it is possible to have a single click code (mouse click zone) that would;
* Start a system (power up)
* Click through 5 Enum's
* On the 5th Enum, have it start its timer scan thing
* Turn off on the 7th click (power down)
Powering up brings the HUD display out of the top of the dash (animation, 3D object) and starts the system.
What I do not know, is how to manage this in a click zone. I have my Font strings all setup and running with the timer, but I would like to expand/improve the system to have this multi-click feature, all on one button.
Is that possible? If so, can you give me a clue as to how it is done?
Here is the 2D display system code;
Note, no clickzone as it is only a display code, riding on the animated part holding the display polygon. The 'button' clickzone is a simple button in the VC that relays the 'startup' code which powers the animation AND the display code system.
I would like to know if it is possible to have a single click code (mouse click zone) that would;
* Start a system (power up)
* Click through 5 Enum's
* On the 5th Enum, have it start its timer scan thing
* Turn off on the 7th click (power down)
Powering up brings the HUD display out of the top of the dash (animation, 3D object) and starts the system.
What I do not know, is how to manage this in a click zone. I have my Font strings all setup and running with the timer, but I would like to expand/improve the system to have this multi-click feature, all on one button.
Is that possible? If so, can you give me a clue as to how it is done?
Here is the 2D display system code;
Note, no clickzone as it is only a display code, riding on the animated part holding the display polygon. The 'button' clickzone is a simple button in the VC that relays the 'startup' code which powers the animation AND the display code system.
Code:
<Macro Name="HUD_POWER_ON">(A:Electrical Master Battery,bool) (A:Avionics master switch,bool) (L:AVE POPUP HUD,bool) and</Macro>
<!-- DISENGAGED
<Element>
<Visible> (A:Avionics master switch,bool) ! (A:Electrical Master Battery,bool) ! || </Visible>
<Position X="0" Y="0"/>
<Image Name="Infoscreen_OFF.bmp" Bright="Yes" ImageSizes="1000,691,1000,691"/>
</Element>
DISENGAGED -->
<!-- =====================MAIN POWER SUPPLY ELEMENT================ -->
<Element>
<Visible>@HUD_POWER_ON</Visible>
<!-- =========================================================== SYSTEM CONTROLLER -->
<Element>
<Select>
<Value>
(L:AVE POPUP HUD, bool) 1 ==
(L:T_HUD_START_TIME,enum) 0 == and
if{
(P:LOCAL TIME, enum) (>L:T_HUD_START_TIME,enum)
1 (>L:T_HUD_START,enum)
0 (>L:AVE POPUP ENUM1,enum)
}
els{ }
(L:AVE POPUP HUD, bool) 0 ==
(L:T_HUD_START_TIME,enum) 0 > and
if{
0 (>L:T_HUD_START,enum)
0 (>L:T_HUD_START_TIME,enum)
}
els{ }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(L:T_HUD_START, enum) 1 ==
(P:LOCAL TIME, enum) (L:T_HUD_START_TIME,enum) - 5 > and
if{
1 (>L:AVE POPUP ENUM1,enum)
}
els{ }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(L:T_HUD_START, enum) 1 ==
(P:LOCAL TIME, enum) (L:T_HUD_START_TIME,enum) - 10 > and
if{
2 (>L:AVE POPUP ENUM1,enum)
}
els{ }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(L:T_HUD_START, enum) 1 ==
(P:LOCAL TIME, enum) (L:T_HUD_START_TIME,enum) - 15 > and
if{
3 (>L:AVE POPUP ENUM1,enum)
}
els{ }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(L:T_HUD_START, enum) 1 ==
(P:LOCAL TIME, enum) (L:T_HUD_START_TIME,enum) - 20 > and
if{
0 (>L:T_HUD_START_TIME,enum)
}
els{ }
</Value>
</Select>
</Element>
<!-- ===========================================================PAGE SYSTEM STARTS HERE -->
<!-- =======================================HEADING -->
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 0 ==
</Visible>
<Position X="20" Y="0"/>
<FormattedText X="380" Y="90" Bright="Yes" Length="3" Font="Nasalization" FontSize="110" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" WidthFit="Yes">
<String>%(360 (A:Plane heading degrees gyro, degrees) dnor near d 0 == ?)%!03d!</String>
</FormattedText>
</Element>
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 0 ==
</Visible>
<Position X="20" Y="76"/>
<FormattedText X="365" Y="40" Bright="Yes" Length="3" Font="Nasalization" FontSize="50" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" WidthFit="Yes">
<String>HEADING</String>
</FormattedText>
</Element>
<!-- ========================================ALTITUDE -->
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 1 ==
</Visible>
<Position X="10" Y="0"/>
<FormattedText X="380" Y="90" Bright="Yes" Length="3" Font="Nasalization" FontSize="110" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>%((A:Plane Altitude, feet) 20000 min 0 max)%!5.0f!</String>
</FormattedText>
</Element>
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 1 ==
</Visible>
<Position X="20" Y="76"/>
<FormattedText X="365" Y="40" Bright="Yes" Length="5" Font="Nasalization" FontSize="50" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>ALTITUDE</String>
</FormattedText>
</Element>
<!-- ===================================AIRSPEED GROUNDSPEED -->
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 2 ==
</Visible>
<Position X="20" Y="0"/>
<FormattedText X="380" Y="90" Bright="Yes" Length="3" Font="Nasalization" FontSize="110" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>%((A:AIRSPEED TRUE, knots) 9999 min 0 max)%!3d!</String>
</FormattedText>
</Element>
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 2 ==
</Visible>
<Position X="20" Y="76"/>
<FormattedText X="365" Y="40" Bright="Yes" Length="3" Font="Nasalization" FontSize="50" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>AIRSPEED</String>
</FormattedText>
</Element>
<!-- ====================================OUTSIDE AIR TEMPERATURE -->
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 3 ==
</Visible>
<Position X="3" Y="0"/>
<FormattedText X="380" Y="90" Bright="Yes" Length="3" Font="Nasalization" FontSize="110" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>%((A:ambient temperature, celsius) 999 min)%!+4d!C</String>
</FormattedText>
</Element>
<Element>
<Visible>
(L:AVE POPUP ENUM1,enum) 3 ==
</Visible>
<Position X="6" Y="76"/>
<FormattedText X="385" Y="40" Bright="Yes" Length="3" Font="Nasalization" FontSize="50" Color="White" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="Yes" FixedWidth="Yes">
<String>OUTSIDE AIR TEMP</String>
</FormattedText>
</Element>
<!-- ===========================================================END OF POWER RELATED SECTIONS -->
</Element>

