I need some help with a code I am writing for use in MakeMDL.parts.xml and modeldef.xml.
I have designed a new glass cockpit gauge with various panels, and in particular a radar.
I have everything working in the 2d panel, AI shows up in a list, I can scroll the list and click on a particular vehicle. I have written code in the HUD to show info of the selected vehicle.
In the VC panel I have made some 3d buttons to activate the panel parts. I can scroll up and down the aircraft list, but I have problems writing the correct animation script for selected vehicles.
The mouse callback_code works as per the 2d mouse functions, but I just cannot get the correct code for the annimation code.
I have 8 buttons, each for a aircraft in the list, so 8 part entries in the makemdl.part.xml
This is one of the ways i tried, without success:
<part>
<name>Target_F</name>
<animation>
<parameter>
<code>(>C:ITrafficInfo:SelectedVehicle:1, number)</code>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>AI 1 </tooltip_text>
<callback_code>(L:ListFirstVis) 1 + (C:ITrafficInfo:ListSize) min (>C:ITrafficInfo:SelectedVehicle)</callback_code>
</mouserect>
</part>
also
<code>(>C:ITrafficInfo:SelectedVehicle 1, number)</code>
<code>(>C:ITrafficInfo:SelectedVehicle, number) 1</code>
<code>(C:ITrafficInfo:SelectedVehicle 1, enum)
Any help will be welcomed.
I have designed a new glass cockpit gauge with various panels, and in particular a radar.
I have everything working in the 2d panel, AI shows up in a list, I can scroll the list and click on a particular vehicle. I have written code in the HUD to show info of the selected vehicle.
In the VC panel I have made some 3d buttons to activate the panel parts. I can scroll up and down the aircraft list, but I have problems writing the correct animation script for selected vehicles.
The mouse callback_code works as per the 2d mouse functions, but I just cannot get the correct code for the annimation code.
I have 8 buttons, each for a aircraft in the list, so 8 part entries in the makemdl.part.xml
This is one of the ways i tried, without success:
<part>
<name>Target_F</name>
<animation>
<parameter>
<code>(>C:ITrafficInfo:SelectedVehicle:1, number)</code>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>AI 1 </tooltip_text>
<callback_code>(L:ListFirstVis) 1 + (C:ITrafficInfo:ListSize) min (>C:ITrafficInfo:SelectedVehicle)</callback_code>
</mouserect>
</part>
also
<code>(>C:ITrafficInfo:SelectedVehicle 1, number)</code>
<code>(>C:ITrafficInfo:SelectedVehicle, number) 1</code>
<code>(C:ITrafficInfo:SelectedVehicle 1, enum)
Any help will be welcomed.


