Control.GetLabel and multiimage query

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #1
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.
(This post was last modified: 2010-09-01 12:46 by Hitcher.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,230
Joined: Oct 2003
Reputation: 177
Post: #2
Yeah - probably just doesn't work. Create a FR ticket and cc me please, and I'll look at it after Dharma.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #3
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?
(This post was last modified: 2010-09-02 04:57 by phil65.)
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #4
It's Control.GetLabel().

Thanks JM.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #5
Done, thanks.

http://trac.xbmc.org/ticket/10069
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #6
Hitcher Wrote:It's Control.GetLabel().

Thanks JM.

i think i also tried that... will have to test it again.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #7
Ah could be this causing you problems -

http://trac.xbmc.org/ticket/9943
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #8
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
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #9
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?
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #10
What Welo? Where?
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #11
Hitcher Wrote:What Welo? Where?

oh sorry, thaught it was your work as you posted so much in that thread.
will ask welo then.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #12
I'm doing the coding for Welo but I'm not sure where I used this in the itemlayout?
find quote
phil65 Offline
Skilled Skinner
Posts: 4,595
Joined: Mar 2009
Reputation: 63
Location: Cologne, Germany
Post: #13
http://www.youtube.com/watch?v=GblGjM8tj...re=related
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #14
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: clipboard02hs.jpg]
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,820
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #15
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.
find quote