I'm trying to add a stack which contains two buttons instead of one button in the aircraft pulldown.
In UnitFlagManager.xml under the
<Instance Name="AirButton" > -line is this:
...
<InstanceData Name="UnitInstance" >
<Button Size="175,26" Anchor="C,C" ID="Button" >
<ShowOnMouseOver>
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</ShowOnMouseOver>
</Button>
</InstanceData>
...
I assume this is the place where the Button instance (for the aircraft) is defined. Is that correct? I tried to replace the aboce mentioned code with this one:
<InstanceData Name="UnitInstance" >
<Stack Anchor="L,C" StackGrowth="Right" Offset="0,0" Padding="0" >
<Button Offset="0,0" Anchor="R,C" Size="200,24" ID="Button" >
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</Button>
<Button Offset="0,0" Anchor="C,C" Size="180,24" ID="Button2" >
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</Button>
</Stack>
</InstanceData>
The whole AirButton disappeared. What am I doing something wrong? Is it even possible to modify this pulldown?
In UnitFlagManager.lua there is this line: (on line 1091)
cityFlagInstance.PullDown:BuildEntry( "UnitInstance", controlTable );
What is this controlTable parameter? I guess this is the place where the lua file refers to the UnitInstance in the Xml file.
In UnitFlagManager.xml under the
<Instance Name="AirButton" > -line is this:
...
<InstanceData Name="UnitInstance" >
<Button Size="175,26" Anchor="C,C" ID="Button" >
<ShowOnMouseOver>
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</ShowOnMouseOver>
</Button>
</InstanceData>
...
I assume this is the place where the Button instance (for the aircraft) is defined. Is that correct? I tried to replace the aboce mentioned code with this one:
<InstanceData Name="UnitInstance" >
<Stack Anchor="L,C" StackGrowth="Right" Offset="0,0" Padding="0" >
<Button Offset="0,0" Anchor="R,C" Size="200,24" ID="Button" >
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</Button>
<Button Offset="0,0" Anchor="C,C" Size="180,24" ID="Button2" >
<AlphaAnim ID="SelectAnim" Anchor="C,C" Offset="0,0" Size="150,24" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="2" AlphaEnd="1">
<Grid ID="SelectHL" Size="150,24" Offset="0,0" Padding="0,0" Style="Grid9FrameTurnsHL" />
</AlphaAnim>
</Button>
</Stack>
</InstanceData>
The whole AirButton disappeared. What am I doing something wrong? Is it even possible to modify this pulldown?
In UnitFlagManager.lua there is this line: (on line 1091)
cityFlagInstance.PullDown:BuildEntry( "UnitInstance", controlTable );
What is this controlTable parameter? I guess this is the place where the lua file refers to the UnitInstance in the Xml file.