Quote:
Originally Posted by BenChen
.. I moved the "Keep jumping, or click piece to end your turn." into a label, but I need to place some temporary graphics underneath. So I tried to make a "popup". I added the appropriate graphic to AppAssets.png and then in AppAssests.xml I made a skin called "popup" (using popup-l, popup-c and popup-r cutouts) and then in draughts.xml I call it as a sprite with id='jumpTextBox'.
But it doesn't work. The sprite appears basically as it appears in AppAssests.png, but doesn't expand to the intended size of the sprite. Can you take a look and see what I am doing wrong?
|
Hi, Ben!
Without checking your code a "first shot into the blue".
Sprites didn't adapt to their bounding-box, they tile.
Basically: Buttons, Panels and text-controls will do.
So puting your label onto a panel, should work.
See "CalculatorLabel" in Calc as example.
HTH
Mark
[EDIT]
Define the popup like this:
Code:
<cutout id="popup-tl" x="728" y="51" width="5" heiht="3"/>
<cutout id="popup-tc" x="733" y="51" width="42" height="5"/>
<cutout id="popup-tr" x="775" y="51" width="5" height="5"/>
<cutout id="popup-ml" x="728" y="55" width="5" height="25"/>
<cutout id="popup-mc" x="733" y="55" width="42" height="25"/>
<cutout id="popup-mr" x="775" y="55" width="5" height="25"/>
<cutout id="popup-bl" x="728" y="81" width="5" height="5"/>
<cutout id="popup-bc" x="733" y="81" width="42" height="5"/>
<cutout id="popup-br" x="775" y="81" width="5" height="5"/>
<skin id="popup"
cutouts="popup-tl,popup-tc,popup-tr,popup-ml,popup-mc,popup-mr,popup-bl,popup-bc,popup-br"/>
and in draughts.xml
Code:
<panel id='jumpTextBox' skin='popup' left='130' width='350' top='24' height='35' active="false" canFocus="false"/>
<label id='jumpText' skin='touchText' left='130' width='350' top='30' height='20' align='center' text='Keep jumping, or click piece to end your turn.'/>
[/EDIT]