Kodi Community Forum
Control.GetLabel and multiimage query - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Control.GetLabel and multiimage query (/showthread.php?tid=80138)

Pages: 1 2


Control.GetLabel and multiimage query - Hitcher - 2010-09-01

I'm trying (unsuccessfully) to pull the image from an off-screen multiimage control using Control.GetLabel() but it's not playing ball.

Here's the code used -

PHP Code:
<control type="multiimage" id="4000">
    <
width>349</width>
    <
height>260</height>
    <
posx>-1000</posx>
    <
posy>-1000</posy>
    <
randomize>true</randomize>
    <
timeperimage>8000</timeperimage>
    <
fadetime>400</fadetime>
    <
texture background="true">$INFO[Skin.String(CustomMovies)]</texture>
</
control
and then this -
PHP Code:
<control type="image">
    <
width>349</width>
    <
height>260</height>
    <
posx>10</posx>
    <
posy>10</posy>
    <
aspectratio aligny="top" scalediffuse="false">scale</aspectratio>
    <
texture background="true" diffuse="home/homematte.png">$INFO[Control.GetLabel(4000)]</texture>
</
control
results in nothing.

If I test it using a single image everything works as expected -

PHP Code:
<control type="image" id="4000">
    <
width>349</width>
    <
height>260</height>
    <
posx>-1000</posx>
    <
posy>-1000</posy>
    <
randomize>true</randomize>
    <
timeperimage>8000</timeperimage>
    <
fadetime>400</fadetime>
    <
texture background="true">$INFO[Skin.String(CustomMovies)]</texture>
</
control

Is it simply that GetLabel doesn't and can't work with multiimage controls?

Thanks.


- jmarshall - 2010-09-02

Yeah - probably just doesn't work. Create a FR ticket and cc me please, and I'll look at it after Dharma.


- phil65 - 2010-09-02

another question about getlabel():
i tried
Code:
<control type="image" id="1111">
      <include>HiddenObject</include>
      <texture>rating/rating0.png</texture>
      <visible>substring(ListItem.Rating,0,left)</visible>
    </control>
    <control type="image" id="1111">
      <include>HiddenObject</include>
      <texture>rating/rating1.png</texture>
      <visible>substring(ListItem.Rating,1,left)</visible>
    </control>... till rating 10

and then try to use $INFO[getlabel(1111)] to give me the correct texture, didn´t work. not possible? or am i doing something wrong?


- Hitcher - 2010-09-02

It's Control.GetLabel().

Thanks JM.


- Hitcher - 2010-09-02

Done, thanks.

http://trac.xbmc.org/ticket/10069


- phil65 - 2010-09-02

Hitcher Wrote:It's Control.GetLabel().

Thanks JM.

i think i also tried that... will have to test it again.


- Hitcher - 2010-09-03

Ah could be this causing you problems -

http://trac.xbmc.org/ticket/9943


- phil65 - 2010-09-03

Hitcher Wrote:Ah could be this causing you problems -

http://trac.xbmc.org/ticket/9943

I found the error now. I put the <include>HiddenStarRatingImages</include> inside the itemlayout section, that didn´t work. anyway, thx for helping so quick again and again Smile


- phil65 - 2010-09-03

Me again.
Just tried to use the GetLabel in <itemlayout> that doesn´t seem to work.
I saw that you have it in your upcoming skin, hitcher. Did you also do that with getlabel or did you define all images and worked with visibilty conditions?


- Hitcher - 2010-09-03

What Welo? Where?


- phil65 - 2010-09-03

Hitcher Wrote:What Welo? Where?

oh sorry, thaught it was your work as you posted so much in that thread.
will ask welo then.


- Hitcher - 2010-09-03

I'm doing the coding for Welo but I'm not sure where I used this in the itemlayout?


- phil65 - 2010-09-03

http://www.youtube.com/watch?v=GblGjM8tjxc&feature=related


- Hitcher - 2010-09-03

Sorry, didn't realise you were talking about the Star Ratings.

That took a while to work out but here's how I did it -

PHP Code:
<texture fallback="Star_Ratings/NA.png">$INFO[ListItem.Rating,Star_Ratings/,.png]</texture

That's the easy bit here's the harder part creating all the textures -

Image


- Hitcher - 2010-12-29

jmarshall Wrote:Yeah - probably just doesn't work. Create a FR ticket and cc me please, and I'll look at it after Dharma.
Time for a friendly little bump now that Dharma's out the door. Wink

I've submitted code for you to use in Confluence to test this out and posted it in the Trac request.

http://trac.xbmc.org/ticket/10069#comment:2

Thanks,

Kev.