[REQUEST] More label controls
#1
is it posible to add more labels controls for use in lists. I.E. we have <label> & <label2> that we can assign for use with python scripts , etc., i would like to have more availble, so i do have to add them manually.

at the moment i use <label> & <label2>, but if i need more then i have to map ALL manually like this:

PHP Code:
<control type="label">
                            <
posx>0</posx>
                            <
posy>0</posy>
                            <
width>900</width>
                            <
height>45</height>
                            <
font>Font_RecentTitleLabel</font>
                            <
textcolor>ccffffff</textcolor>
                            <
aligny>center</aligny>
                            <
label fallback="-">[UPPERCASE][b]$INFO[Container(8001).ListItem.Label][/b][/UPPERCASE]</label>
                        </
control>
                        <
control type="label">
                            <
posx>0</posx>
                            <
posy>65</posy>
                            <
width>900</width>
                            <
height>30</height>
                            <
font>Font_RecentTitleLabel2</font>
                            <
textcolor>ccFFFFFF</textcolor>
                            <
aligny>center</aligny>
                            <
label fallback="-">[UPPERCASE]$INFO[Container(8001).ListItem.Label2][/UPPERCASE]</label>
                            <
visible>Container(300).HasFocus(1)|Container(300).HasFocus(7)</visible>
                        </
control>
                        <
control type="textbox">
                             <
font>Font_WidgetPlot</font>
                             <
posx>0</posx>
                             <
posy>20</posy>
                             <
width>1400</width>
                             <
height>650</height>
                             <
textcolor>c0FFFFFF</textcolor>
                             <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
                             <
label fallback="31414">$INFO[Window.Property(LatestEpisode.1.Plot)]</label>
                             <
visible>Container(8001).Row(0)</visible>
                         </
control>
                         <
control type="textbox">
                             <
font>Font_WidgetPlot</font>
                             <
posx>0</posx>
                             <
posy>20</posy>
                             <
width>1400</width>
                             <
height>650</height>
                             <
textcolor>c0FFFFFF</textcolor>
                             <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
                             <
label fallback="31414">$INFO[Window.Property(LatestEpisode.2.Plot)]</label>
                             <
visible>Container(8001).Row(1)</visible>
                         </
control>
etc...... 
but i would like to just use <label3> like this:

the list code could be like this:

PHP Code:
<item id="1">
                            <
label>$INFO[Window.Property(LatestEpisode.1.EpisodeTitle)]</label>
                            <
label2>$INFO[Window.Property(LatestEpisode.1.ShowTitle)] - $INFO[Window.Property(LatestEpisode.1.EpisodeNo)]</label2>
                            <
label3>$INFO[Window.Property(LatestEpisode.1.Plot)]</label3>
                            <
onclick>PlayMedia($INFO[Window.Property(LatestEpisode.1.Path)])</onclick>
                            <
thumb>$INFO[Window.Property(LatestEpisode.1.Thumb)]</thumb>
                            <
visible>!Control.IsVisible(87)</visible>
                            <
visible>Container(300).HasFocus(7)</visible>
                        </
item
PHP Code:
<control type="label">
                            <
posx>0</posx>
                            <
posy>0</posy>
                            <
width>900</width>
                            <
height>45</height>
                            <
font>Font_RecentTitleLabel</font>
                            <
textcolor>ccffffff</textcolor>
                            <
aligny>center</aligny>
                            <
label fallback="-">[UPPERCASE][b]$INFO[Container(8001).ListItem.Label][/b][/UPPERCASE]</label>
                        </
control>
                        <
control type="label">
                            <
posx>0</posx>
                            <
posy>65</posy>
                            <
width>900</width>
                            <
height>30</height>
                            <
font>Font_RecentTitleLabel2</font>
                            <
textcolor>ccFFFFFF</textcolor>
                            <
aligny>center</aligny>
                            <
label fallback="-">[UPPERCASE]$INFO[Container(8001).ListItem.Label2][/UPPERCASE]</label>
                            <
visible>Container(300).HasFocus(1)|Container(300).HasFocus(7)</visible>
                        </
control>
                         <
control type="textbox">
                             <
font>Font_WidgetPlot</font>
                             <
posx>0</posx>
                             <
posy>20</posy>
                             <
width>1400</width>
                             <
height>650</height>
                             <
textcolor>c0FFFFFF</textcolor>
                             <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
                             <
label fallback="31414">$INFO[Container(8001).ListItem.Label3]</label>
                         </
control
maybe we could have 10 availble for use ?
Reply
#2
use properties

edit: unless you mean static lists, then i would agree.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
i think in this case you can abuse <icon> to get a third label.

so change:
Code:
<label3>$INFO[Window.Property(LatestEpisode.1.Plot)]</label3>
to:
Code:
<icon>$INFO[Window.Property(LatestEpisode.1.Plot)]</icon>

and:
Code:
<label fallback="31414">$INFO[Container(8001).ListItem.Label3]</label>
to:
Code:
<label fallback="31414">$INFO[Container(8001).ListItem.Icon]</label>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Properties are the only thing we'll add. Not more labels. There's no doubt a trac ticket already for it (probably from Nuka1195 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
Reply
#5
Nuka1195 Wrote:use properties

edit: unless you mean static lists, then i would agree.

could you explain for me please
Reply
#6
i do have a patch, so probably a ticket for static lists.

ronnie, you may need ActualIcon

but if your filling from python (i'm a little confused) you already can use properties.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
http://trac.xbmc.org/ticket/6692#comment:3
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
sorry, dont understand, is there no way i can add just one entry per item, then just call it as label within the fixedlist ? at the moment i have to do seperate labels ( one for every line of the list) so if the the list has 17 lines to it i have to use some thing like this (out side of the fixedlist code)

below is example of my curent code. it only show 3 line but i have 17 line to my fixedlist so this would be repeated for ALL 17 items. andthis use lots of code. and this is just for the tv epsidoe plot, i need to do this all other parts for music (album artists album name, review etc, etc) and this is a major problem for me, my skin is getting so bloated to try to work arround XBMC limtations, surly there a better way of coding this stuf. any ideas would be greatly accepted Smile

PHP Code:
<control type="group">
    <
visible>Container(300).HasFocus(7)</visible>
    <
control type="textbox">
        <
font>Font_WidgetPlot</font>
        <
posx>0</posx>
        <
posy>20</posy>
        <
width>1400</width>
        <
height>650</height>
        <
textcolor>c0FFFFFF</textcolor>
        <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
        <
label fallback="31414">$INFO[Window.Property(LatestEpisode.1.Plot)]</label>
        <
visible>Container(8001).Row(0)</visible>
    </
control>
    <
control type="textbox">
        <
font>Font_WidgetPlot</font>
        <
posx>0</posx>
        <
posy>20</posy>
        <
width>1400</width>
        <
height>650</height>
        <
textcolor>c0FFFFFF</textcolor>
        <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
        <
label fallback="31414">$INFO[Window.Property(LatestEpisode.2.Plot)]</label>
        <
visible>Container(8001).Row(1)</visible>
    </
control>
    <
control type="textbox">
        <
font>Font_WidgetPlot</font>
        <
posx>0</posx>
        <
posy>20</posy>
        <
width>1400</width>
        <
height>650</height>
        <
textcolor>c0FFFFFF</textcolor>
        <
autoscroll delay="8000" time="2000" repeat="10000"></autoscroll>
        <
label fallback="31414">$INFO[Window.Property(LatestEpisode.3.Plot)]</label>
        <
visible>Container(8001).Row(2)</visible>
    </
control
edit i also have i problem with FANART & THUMBS, if i set the fanart to <thumb>$INFO[Window.Property(LatestEpisode.3.Fanart)]</thumb> and the thumb to <icon>$INFO[Window.Property(LatestEpisode.3.Icon)]</icon> and then the with the corrisponding image controls it only allows one image either thumb or icon not both as a unique, is this a bug or just another limaitation ?

PHP Code:
<item id="1">
                            <
label>$INFO[Window.Property(LatestEpisode..EpisodeTitle)]</label>
                            <
label2>$INFO[Window.Property(LatestEpisode.1.ShowTitle)] - $INFO[Window.Property(LatestEpisode.1.EpisodeNo)]</label2>
                            <
onclick>PlayMedia($INFO[Window.Property(LatestEpisode.1.Path)])</onclick>
                            <
thumb>$INFO[Window.Property(LatestEpisode.1.Fanart)]</thumb>
                            <
icon>$INFO[Window.Property(LatestEpisode.1.Thumb)]</icon>
                            <
visible>!Control.IsVisible(87)</visible>
                            <
visible>Container(300).HasFocus(7)</visible>
                        </
item
PHP Code:
<control type="image">
            <include>
BackgroundVarsGlobal</include>
            <
texture background="true">$INFO[Container(8001).ListItem.Icon]</texture>
        </
control
PHP Code:
<control type="image">
            <include>
BackgroundVarsGlobal</include>
            <
texture background="true">$INFO[Container(8001).ListItem.Thumb]</texture>
        </
control
Reply
#9
got the above problem sorted in the end Smile

any furhter procgress on http://trac.xbmc.org/ticket/6692 making it into a svn ?
Reply
#10
r26935 should do the trick.
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
#11
jmarshall Wrote:r26935 should do the trick.

cheers Jonathan, i'll test once i can get a nightly with it in Smile

EDIT, i see you used a different method, could you tell me how to use it ?
Reply
#12
I assume from the trac -
Code:
<property name="foo">value</property>
Reply
#13
Hitcher Wrote:I assume from the trac -
Code:
<property name="foo">value</property>

hitcher where did you find that ?, i could not find track r26935

edit: i swear that was not there before lol
Reply
#14
i cant get this work, can anyone help

in static list
PHP Code:
<property name="AlbumTitle">$INFO[Window.Property(LatestSong.1.Album)] - $INFO[Window.Property(LatestSong.1.Artist)]</property
outside of list
PHP Code:
<label>[UPPERCASE]$INFO[Container(8001).Window.Property(AlbumTitle)][/UPPERCASE]</label
also tried
PHP Code:
<label>[UPPERCASE]$INFO[Container(8001).ListItem.Property(AlbumTitle)][/UPPERCASE]</label
PHP Code:
<label>[UPPERCASE]$INFO[Container(8001).ListItem.AlbumTitle][/UPPERCASE]</label
Reply
#15
this is working fine on my end:

in the <content> section of a static list:
Quote:<property name="FanartImage">$INFO[Window.Property(LatestMovie.1.Fanart)]</property>

outside the list:
Quote:<texture background="true">$INFO[Container(5044).ListItem.Property(FanartImage)]</texture>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] More label controls0