Do variables work with image width & height?
#1
Can't get this to work at all.

Code:
            <control type="image">
            <posx>500</posx>
            <posy>100</posy>
            <width>$VAR[MyTest1]</width>
            <height>$VAR[MyTest2]</height>
            <texture>somejpg.jpg</texture>
            </control>

The variables are working (tested using a label), But not for images.
Anyone using variables for width & height? if so what am i doing wrong?

Thanks
Reply
#2
(2012-12-03, 19:17)buges Wrote: Can't get this to work at all.

Code:
            <control type="image">
            <posx>500</posx>
            <posy>100</posy>
            <width>$VAR[MyTest1]</width>
            <height>$VAR[MyTest2]</height>
            <texture>somejpg.jpg</texture>
            </control>

The variables are working (tested using a label), But not for images.
Anyone using variables for width & height? if so what am i doing wrong?

Thanks

not possible, vars don´t work for height/width.
you have to define a seperate control for each case.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Conditional Includes it is then.

Thanks phil65
Reply
#4
Pieh has said before that he'll eventually add in $VAR for numerals once he's able to get auto-sizing controls out of the way. Be aware though that <includes> will work but you'll run into problems. IIRC include conditions are only evaluated on loading the xml. So if, for example, you're using includes in ViewList for a list control to determine the width of the control, you'll need to refresh the skin in order for the new include to take effect.
Reply
#5
Or perhaps a zoom animation (not sure what you want to do exactly):
Code:
<animation reversible="false" effect="zoom" start="10,16,100,200" end="10,16,100,600" time="200">focus</animation>
<animation reversible="false" effect="zoom" end="10,16,100,200" start="10,16,100,600" time="200">unfocus</animation>
That would be "x,y,w,h". Will require that you set an initial width, height, x and y on the image.
For a more complete example have a look at the focused item in fanart view in Confluence. And make them conditional.

Btw, a VAR in aspectratio would also be very welcome.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#6
(2012-12-04, 01:31)MassIV Wrote: Or perhaps a zoom animation (not sure what you want to do exactly):
Code:
<animation reversible="false" effect="zoom" start="10,16,100,200" end="10,16,100,600" time="200">focus</animation>
<animation reversible="false" effect="zoom" end="10,16,100,200" start="10,16,100,600" time="200">unfocus</animation>
That would be "x,y,w,h". Will require that you set an initial width, height, x and y on the image.
For a more complete example have a look at the focused item in fanart view in Confluence. And make them conditional.

Btw, a VAR in aspectratio would also be very welcome.

While that would work for the image, the text will still need to be adjust for width. Adding the zoom animation to the text control will stretch the text leading to narrower / wider text instead of less / more text based on width.

Reply
#7
Thanks for the info.
Reply
#8
Thnx, i needed this info aswell
Reply

Logout Mark Read Team Forum Stats Members Help
Do variables work with image width & height?0