<altlabel> help, for LISTS
#1
hi all you guru's,

is they away i can use the <altlabel> in a LIST for the Skin.ToggleSetting(), at the moment i have to use 2 items with the same ID but different visible's (one for each button state) i would like the optimise my code so that it only has use 1 button thus saving 50% on coding.

here is what i use now:
PHP Code:
    <item id="104">
        <
label>OFF</label>
        <
onclick>Skin.ToggleSetting(menu1on)</onclick>
        <
visible>!Skin.HasSetting(menu1on)</visible>
        <
visible>Container(971).HasFocus(8)</visible>
    </
item>
    <
item id="104">
        <
label>ON</label>
        <
onclick>Skin.Reset(menu1on)</onclick>
        <
visible>Skin.HasSetting(menu1on)</visible>
        <
visible>Container(971).HasFocus(8)</visible>
    </
item

i would like to do something like this:
PHP Code:
    <item id="104">
        <
label>OFF</label>
        <
altlabel>ON</altlabel>
        <
onclick>Skin.ToggleSetting(menu1on)</onclick>
        <
selected>Skin.HasSetting(menu1on)</selected>
        <
visible>Container(971).HasFocus(8)</visible>
    </
item

i know this does not work but could i do something similar ?, i even thought about <label2> but it would display in both states. does anyone have any ideas ?

Thanks
Reply
#2
Nope, no way to do it.
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
Reply
#3
jmarshall Wrote:Nope, no way to do it.

is it something that could be added to XBMC ?, it seems more logical to use something like this, that to have 2 button's to basically to do the same task just a different label.
Reply
#4
I don't see "altlabel" as being any use, no. It gives zero indication as to when the label should be used and when it shouldn't be.

Instead, skin variables will fulfill this purpose if and when I get around to doing them.
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
Reply
#5
jmarshall Wrote:I don't see "altlabel" as being any use, no. It gives zero indication as to when the label should be used and when it shouldn't be.

Instead, skin variables will fulfill this purpose if and when I get around to doing them.

ok i see it working this the altlabel would display when the <selected></selected> it met.

i guess i can't optimise my code any further. just i have load of these button's and it would have saved me 100's of lines of code.
Reply
#6
I have to ask why are you using a list for skin settings anyway ?
why not use a grouplist then put a togglebutton (and other buttons) in it so you can use altlabel and altclick and so on ?
Reply
#7
Jezz_X Wrote:I have to ask why are you using a list for skin settings anyway ?
why not use a grouplist then put a togglebutton (and other buttons) in it so you can use altlabel and altclick and so on ?

it is how the customisation (turn on and off) of the aeon menus work?, the second button is so the label text colour goes from white (turn on) to dark grey (turned off), so basically i just need an alternate text colour for the alt state of the button, and as you see it mounts up to a lot of code just to change the text colour.

here id a sample of the code in use, if you have any ideas on how i can change it, that would be great.

PHP Code:
                    <control type="wraplist" id="301">
                        <
posx>0</posx>
                        <
posy>-1</posy>
                        <
height>40</height>
                        <
width>840</width>
                        <
onleft>301</onleft>
                        <
onright>301</onright>
                        <
onup>346</onup>
                        <
ondown>10</ondown>
                        <
viewtype>list</viewtype>
                        <
orientation>horizontal</orientation>
                        <
focusposition>2</focusposition>
                        <
scrolltime>200</scrolltime>
                        <
visible allowhiddenfocus="true">Control.HasFocus(301) | Container(10).HasFocus(2) | Control.HasFocus(345)</visible>
                        <include>
homesubmenu_Customiseanimation</include>
                        <
animation effect="fade" start="0" end="100" time="200" condition="!Window.Previous(56) + !Window.Previous(12) + !Window.Previous(13) + !Window.Previous(14) + !Window.Previous(15) + !Window.Previous(16) + !Window.Previous(17) + !Window.Previous(18) + !Window.Previous(19)">WindowOpen</animation>
                        <
itemlayout width="184" height="40">
                            <
control type="label">
                                <include>
VirtualMainMenu_Label</include>
                                <
info>ListItem.Label</info>
                                <
textcolor>48FFFFFF</textcolor>
                                <
animation effect="fade" start="100" end="0" time="200" condition="Window.Next(56) | Window.Next(12) | Window.Next(13) | Window.Next(14) | Window.Next(15) | Window.Next(16) | Window.Next(17) | Window.Next(18) | Window.Next(19) | Window.Next(3) | Window.Next(2) | Window.Next(20) | Window.Next(1) | Window.Next(24) | Window.Next(25) | Window.Next(501) | Window.Next(502) | Window.Next(2600)">Conditional</animation>
                            </
control>
                            <
control type="label">
                                <include>
VirtualMainMenu_Label</include>
                                <
info>ListItem.Label2</info>
                                <
textcolor>48000000</textcolor>
                                <
animation effect="fade" start="100" end="0" time="200" condition="Window.Next(56) | Window.Next(12) | Window.Next(13) | Window.Next(14) | Window.Next(15) | Window.Next(16) | Window.Next(17) | Window.Next(18) | Window.Next(19) | Window.Next(3) | Window.Next(2) | Window.Next(20) | Window.Next(1) | Window.Next(24) | Window.Next(25) | Window.Next(501) | Window.Next(502) | Window.Next(2600)">Conditional</animation>
                            </
control>
                        </
itemlayout>
                        <
focusedlayout width="184" height="40">
                            <
control type="label">
                                <include>
VirtualMainMenu_Label</include>
                                <
info>ListItem.Label</info>
                                <
textcolor>48FFFFFF</textcolor>
                                <
animation effect="fade" start="100" end="0" time="200" condition="Window.Next(56) | Window.Next(12) | Window.Next(13) | Window.Next(14) | Window.Next(15) | Window.Next(16) | Window.Next(17) | Window.Next(18) | Window.Next(19) | Window.Next(3) | Window.Next(2) | Window.Next(20) | Window.Next(1) | Window.Next(24) | Window.Next(25) | Window.Next(501) | Window.Next(502) | Window.Next(2600)">Conditional</animation>
                            </
control>        
                            <
control type="label">
                                <include>
VirtualMainMenu_Label</include>
                                <
info>ListItem.Label</info>
                                <
textcolor>FFFFFFFF</textcolor>
                                <
animation effect="fade" start="0" end="100" time="200">Focus</animation>
                                <
animation effect="fade" start="100" end="0" time="200">Unfocus</animation>                
                                <
animation effect="fade" start="100" end="0" time="200" condition="Window.Next(3) | Window.Next(2) | Window.Next(20) | Window.Next(1) | Window.Next(24) | Window.Next(25) | Window.Next(501) | Window.Next(502) | Window.Next(2600)">Conditional</animation>
                            </
control>
                            <
control type="label">
                                <include>
VirtualMainMenu_Label</include>
                                <
info>ListItem.Label2</info>
                                <
textcolor>48000000</textcolor>
                                <
animation effect="fade" start="100" end="0" time="200" condition="Window.Next(3) | Window.Next(2) | Window.Next(20) | Window.Next(1) | Window.Next(24) | Window.Next(25) | Window.Next(501) | Window.Next(502) | Window.Next(2600)">Conditional</animation>
                            </
control>
                        </
focusedlayout>
                        <
content>
                            <
item id="1">
                                <
label>31010</label>
                                <include>
BackgroundVarsMusic</include>                        
                                <
onclick>Skin.ToggleSetting(nomusic)</onclick>
                                <
visible>!Skin.HasSetting(nomusic)</visible>
                            </
item>
                            <
item id="1">
                                <
label2>31010</label2>
                                <include>
BackgroundVarsMusic</include>                        
                                <
onclick>Skin.Reset(nomusic)</onclick>
                                <
visible>Skin.HasSetting(nomusic)</visible>
                            </
item>
                            <
item id="5">
                                <
label>31012</label>
                                <include>
BackgroundVarsPictures</include>                    
                                <
onclick>Skin.SetBool(nopictures)</onclick>
                                <
visible>!Skin.HasSetting(nopictures)</visible>
                            </
item>
                            <
item id="5">
                                <
label2>31012</label2>
                                <include>
BackgroundVarsPictures</include>                    
                                <
onclick>Skin.Reset(nopictures)</onclick>
                                <
visible>Skin.HasSetting(nopictures)</visible>
                            </
item>
                            <
item id="6">
                                <
label>31013</label>
                                <include>
BackgroundVarsMovies</include>                    
                                <
onclick>Skin.SetBool(nomovies)</onclick>
                                <
visible>library.hascontent(movies)</visible>
                                <
visible>!Skin.HasSetting(nomovies)</visible>
                            </
item>
                            <
item id="6">
                                <
label2>31013</label2>
                                <include>
BackgroundVarsMovies</include>                    
                                <
onclick>Skin.Reset(nomovies)</onclick>
                                <
visible>library.hascontent(movies)</visible>
                                <
visible>Skin.HasSetting(nomovies)</visible>
                            </
item

EDIT:

i now understand, i already use this method for my submenus that i rewrote, god know i did not think of that, thanks Jezz Big Grin.

lets see if i can get it to work Smile,
Reply
#8
how do i use the the <disabledcolor> control ?, i need 3 colour state for a button

1 - enabled
2 - focused
3 - alt colour state, disabledcolor ?

is this possible ?

i have the enabled and focsed colours working, but how do i get the colour to change when the <usealttexture>!Skin.HasSetting(sub_tv_Genre)</usealttexture> is met.


PHP Code:
    <control type="togglebutton" id="34501">
        <
description>By Genre on</description>
        <
height>40</height>
        <
width>184</width>
        <
pulseonselect>false</pulseonselect>
        <
textcolor>48FFFFFF</textcolor>
        <
focusedcolor>FFFFFFFF</focusedcolor>
        <
disabledcolor>48000000</disabledcolor>
        <
textoffsetx>0</textoffsetx>
        <
font>Font_VirtualMainMenu</font>
        <
align>center</align>
        <
aligny>center</aligny>
        <
label>135</label>
        <
altlabel>135</altlabel>
        <
usealttexture>!Skin.HasSetting(sub_tv_Genre)</usealttexture>                    
        <
onclick>Skin.ToggleSetting(sub_tv_Genre)</onclick>
        <
visible>Container(301).HasFocus(7)</visible>
    </
control
Reply
#9
why not use [COLOR] in the <altlabel> tag?
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
Reply

Logout Mark Read Team Forum Stats Members Help
<altlabel> help, for LISTS0