Kodi Community Forum
Is this possible. Auto Sizing??? - 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: Is this possible. Auto Sizing??? (/showthread.php?tid=76036)



Is this possible. Auto Sizing??? - igotdvds - 2010-06-22

I want to make a menu made up of labels but I need each menu item to start where the other leaves off.

Example:

TV Shows\Movies\Music\Settings

The "\"s would separate them.

I am using a fixed list with <content> defined for each menu item and cant get them to line up back to back.

I have tinkered with the Auto sizing label feature to no avail.

Can anyone help?


- Sranshaft - 2010-06-22

Have you tried using a grouplist for your auto-sizing labels?


- igotdvds - 2010-06-22

Sranshaft Wrote:Have you tried using a grouplist for your auto-sizing labels?

I cant use static content with a grouplist.


- Sranshaft - 2010-06-22

Ah fair enough. Didn't see that part...


- jmarshall - 2010-06-22

Not sure why having static content matters, but isn't this what Hitcher did as an experiment with Alaska?

Only way is grouplist with autowidth labels as Sranshaft suggests.


- Hitcher - 2010-06-22

I use it in a few places in Alaska Revisited and it works great.

Here's how I use it for VideoOSD to display all the info in one line -

PHP Code:
<control type="grouplist">
    <
posx>30</posx
    <
posy>38</posy
    <
width>1218</width
    <
height>40</height
    <
itemgap>6</itemgap>
    <
align>left</align>
    <
orientation>horizontal</orientation>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>42</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabelHeading</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>[b]$LOCALIZE[562][/b]</label>
        <
visible>!IsEmpty(VideoPlayer.Year)</visible>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>40</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabel</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>$INFO[VideoPlayer.Year,,  ]</label>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>42</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabelHeading</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>[b]$LOCALIZE[563][/b]</label>
        <
visible>!IsEmpty(VideoPlayer.Rating)</visible>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>40</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabel</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>$INFO[VideoPlayer.Rating,,  ]</label>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>42</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabelHeading</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>[b]$LOCALIZE[20339][/b]</label>
        <
visible>!IsEmpty(VideoPlayer.Director)</visible>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>40</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabel</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>$INFO[VideoPlayer.Director,,  ]</label>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>42</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabelHeading</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>[b]$LOCALIZE[20417][/b]</label>
        <
visible>!IsEmpty(VideoPlayer.Writer)</visible>
    </
control>
    <
control type="label">
        <
width min="10" max="1220">auto</width>
        <
height>40</height>
        <
aligny>center</aligny>
        <
font>Font_OSDInfoLabel</font>
        <
textcolor>OSDInfo</textcolor>
        <
label>$INFO[VideoPlayer.Writer]</label>
    </
control>
</
control



- igotdvds - 2010-06-22

That works great for a grouplist but I am trying to do this for the Home Menu, which I need to define the following:

<item id="1">
<description>Movies</description>
<label>$LOCALIZE[342]</label>
<icon>homeicons/movies-full.png</icon>
<thumb>special://skin/backgrounds/movies.jpg</thumb>
<onclick>ActivateWindow(VideoLibrary,movietitles)</onclick>
<visible>!Skin.HasSetting(HomeMenuNoMoviesButton)</visible>
</item>

I cant define those things in a grouplist and without them I cant use a bunch of the things I have setup for the home screen.

I just want the home screen items to end up back to back, I guess it cant be done while still defining those items. Sad


- Hitcher - 2010-06-22

So you want something like the Dynamically Spaced Labels test I tried for Alaska Revisited?


- igotdvds - 2010-06-22

Hitcher Wrote:So you want something like the Dynamically Spaced Labels test I tried for Alaska Revisited?

If all of those fields can be defined in that method, yes!

I need thumb, icon, etc. for other things on the home screen.


- Hitcher - 2010-06-22

I no longer have the code but you simply fill all the <label></label> tags with Container(n).ListItem(-1), Container(n).ListItem, Container(n).ListItem(1), etc.

The problem comes if you want the list to scroll because you have to set it up like a Coverflow view and you can only have a fixed slide movement.


- igotdvds - 2010-06-22

Hitcher Wrote:I no longer have the code but you simply fill all the <label></label> tags with Container(n).ListItem(-1), Container(n).ListItem, Container(n).ListItem(1), etc.

The problem comes if you want the list to scroll because you have to set it up like a Coverflow view and you can only have a fixed slide movement.

So I would have a Control for a fixed list with my static content set, then a group list with multiple Label controls for each item in the menu then assign the labels in the group list to the items from the fixed list?