- Messages
- 231
- Country

I am trying to get my Attitude_Cage_Button.bmp to rotate when the mouse area for attitude cage is clicked(the mouse area overlays the .bmp) So far none of the rotate codes from the tutorial produce any movement in the bitmap when the mouse area is clicked. The code below, my most current failure, is written I think for a complete rotation of the .bmp. Ideally a 1/8 rotation is what I am shooting for. Can some one review my code and tell me where I am going wrong?
Carl
Code:
<Gauge Name="f4u1 aileron trim" Version="1.0">
<Image Name="background1.bmp"/>
<Element>
<MaskImage Name="f117 pfd_attitude_card_mask.bmp">
<Axis X="512" Y="512"/>
</MaskImage>
<Image Name="f117 pfd_attitude_card.bmp">
<Axis X="484" Y="500"/>
</Image>
<Shift>
<Value Minimum="-90" Maximum="90">(A:Attitude indicator pitch degrees,
degrees) /-/</Value>
<Scale Y="4"/>
</Shift>
<Rotate>
<Value>(A:Attitude indicator bank degrees, radians)</Value>
</Rotate>
</Element>
<Element>
<MaskImage Name="bank_indiktr_card_mask.bmp">
<Axis X="454" Y="454"/>
</MaskImage>
<Image Name="bank_indiktr.bmp">
<Axis X="360" Y="360"/>
</Image>
<Rotate>
<Value>(A:Attitude indicator bank degrees,radians)</Value>
</Rotate>
</Element>
<Element>
<MaskImage Name="bank_indiktr_card_mask.bmp">
<Axis X="454" Y="454"/>
</MaskImage>
<Image Name="attitude_zero_bar.bmp">
<Axis X="236" Y="19"/>
</Image>
<Shift>
<Value Minimum="-90" Maximum="90">(A:Attitude bars position, degrees) /-/ </Value>
<Scale Y="2"/>
</Shift>
</Element>
<Element>
<Position X="876" Y="852"/>
<Image Name="Attitude_Cage_Button.bmp">
<Axis X="124" Y="123"/>
</Image>
<Rotate>
<Value>(A:Attitude_Cage_Button)</Value>
<Nonlinearity>
<Item Value="0" X="752" Y="728"/>
<Item Value="1" X="999" Y="728"/>
<Item Value="2" X="999" Y="973"/>
<Item Value="3" X="752" Y="973"/>
</Nonlinearity>
</Rotate>
</Element>
<Element>
<Position X="407" Y="912"/>
<Image Name="postion_bar_ adj.bmp"/>
<Axis X="51" Y="51"/>
<Update Frequency="2"/>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_ATTITUDE_INDICATOR"/>
<Tooltip ID="TOOLTIPTEXT_ATTITUDE_INDICATOR_BANK_PITCH"/>
<Area Left="407" Top="912" Width="101" Height="101">
<Tooltip>Left Click Attitude bar Up, right click Down</Tooltip>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle" Repeat="Yes">
(M:Event) 'LeftSingle' scmp 0 ==
if{ (>K:ATTITUDE_BARS_POSITION_UP) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (>K:ATTITUDE_BARS_POSITION_DOWN) }
</Click>
</Area>
<Area Left="752" Top="729" Width="248" Height="246">
<Tooltip>Left Click Toggles Cage Attitude</Tooltip>
<Cursor Type="Hand"/>
<Click Kind="LeftSingle" Repeat="Yes">
(M:Event) 'LeftSingle' scmp 0 ==
if{ (>K:ATTITUDE_CAGE_BUTTON) }
</Click>
</Area>
Carl


