Control.GetLabel not working for altlabel

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #1
So I can have my submenu dynamically spaced I'm using a hidden control group for the buttons like this -

PHP Code:
<control type="button" id="3">
    <
label>-</label>
</
control
and then using an autosize control group for the labels -

PHP Code:
<control type="label">
    <
width min="29" max="200">auto</width>
    <
height>20</height>
    <
aligny>center</aligny>
    <
font>Font_14</font>
    <
textcolor>White</textcolor>
    <
label>$INFO[Control.GetLabel(3)]</label>
</
control

Which works just fine until I get to the tooglebuttons.

This
PHP Code:
<control type="togglebutton" id="4">
    <
label>Ascending</label>
    <
altlabel>Descending</altlabel>
</
control
and this
PHP Code:
<control type="label">
    <
width min="29" max="200">auto</width>
    <
height>20</height>
    <
aligny>center</aligny>
    <
font>Font_14</font>
    <
textcolor>White</textcolor>
    <
label>$INFO[Control.GetLabel(4)]</label>
</
control
only ever returns 'Ascending' not the alt version 'Descending'.


Is this a bug or just the way it is?

Thanks.

[Image: sig_zps3af3b48e.jpg]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
Does the hidden button ever get toggled?

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
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #3
Yes, in that example clicking it reverses the list order so it's working ok.

[Image: sig_zps3af3b48e.jpg]
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #4
I did think of using system.getbool(lookandfeel.sortorder) but there are 16 entries for all the different viewmodes and I've don't know how to define which one I'm currently in.

[Image: sig_zps3af3b48e.jpg]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #5
Ok, I think I see the issue. It'd be nice if I could have some XML to test the fix with, else I'll fix in the blind Smile

Cheers,
Jonathan

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
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #6
I see if I knock up a quick and dirty hack to Confluence.

[Image: sig_zps3af3b48e.jpg]
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #7
Confluence - MyVideoNav.xml

Replace

PHP Code:
<control type="togglebutton" id="4">
    <
description>Sort asc</description>
    <
posx>220</posx>
    <
posy>53</posy>
    <
label>-</label>
    <
onleft>3</onleft>
    <
onright>50</onright>
    <
onup>2</onup>
    <
ondown>99</ondown>
</
control
with
PHP Code:
<control type="togglebutton" id="4">
    <
description>Sort asc</description>
    <include>
ButtonMediaSubCommonValues</include>
    <
label>Ascending</label>
    <
altlabel>Descending</altlabel>
    <
posx>220</posx>
    <
posy>53</posy>
    <
onleft>3</onleft>
    <
onright>50</onright>
    <
onup>2</onup>
    <
ondown>99</ondown>
</
control>
<
control type="label">
    <
description>Sort asc</description>
    <include>
ButtonMediaSubCommonValues</include>
    <
posx>420</posx>
    <
posy>53</posy>
    <
label>$INFO[Control.GetLabel(4)]</label>
</
control

Then change sort order.

Thanks.

EDIT: Also marvel at my skinning skills.

[Image: sig_zps3af3b48e.jpg]
(This post was last modified: 2010-07-25 01:33 by Hitcher.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #8
Hey, that skinning is still better than most of my efforts Tongue

Fixed in r32144, r32145.

Cheers,
Jonathan

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
Hitcher Offline
Skilled Skinner
Posts: 9,942
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #9
jmarshall Wrote:Hey, that skinning is still better than most of my efforts Tongue

Fixed in r32144, r32145.

Cheers,
Jonathan
In action - http://www.youtube.com/watch?v=0xOCeuxhCHs

Thanks Jonathan.

[Image: sig_zps3af3b48e.jpg]
find quote