Kodi Community Forum
please help - list selected item - 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: please help - list selected item (/showthread.php?tid=174099)



please help - list selected item - canucks - 2013-09-23

Hi,

I am writing an add-on and it has a custom skin for the layout. I am reading the wiki and attempting to look at other skin for help, but i still can't figure out why;
1. my list is so small, it only display a few items, where in fact i want it to take up the whole screen vertically
2. when i move the arrow key, it changes the selected item but i don't see any indicator to tell me that something is selected

there are plethora of other problems, but lets start with these two. and below is the xml file

Code:
<window>
    <allowoverlay>no</allowoverlay>
    <defaultcontrol always="false">1000</defaultcontrol>
    <coordinates>
        <system>1</system>
        <posx>0</posx>
        <posy>0</posy>
    </coordinates>
    <controls>
        <control type="group">
            <description>main group</description>
            <posx>0</posx>
            <posy>0</posy>
            <width>1920</width>
            <height>1080</height>
            <aspectratio>stretch</aspectratio>
            <visible>true</visible>
            <control type="label">
                <description>current date</description>
                <posx>400r</posx>
                <posy>33</posy>
                <width>300</width>
                <height>50</height>
                <label>[B]$INFO[System.Date][/B]</label>
                <font>Font-Condensed-S48</font>
                <textcolor>DDFFFFFF</textcolor>
                <scroll>false</scroll>
                <align>center</align>
            </control>
            <control type="label">
                <description>current date</description>
                <posx>400r</posx>
                <posy>66</posy>
                <width>300</width>
                <height>50</height>
                <label>[B]$INFO[System.Time][/B]</label>
                <font>Font-Condensed-S34</font>
                <textcolor>DDFFFFFF</textcolor>
                <scroll>false</scroll>
                <align>center</align>
            </control>
            <control type="group">
                <description>group for game list and video window</description>
                <posx>100</posx>
                <posy>100</posy>
                <width>750</width>
                <height>1000</height>
                <aspectratio>stretch</aspectratio>
                <control type="label">
                    <description>game date</description>
                    <posx>0</posx>
                    <posy>33</posy>
                    <width>300</width>
                    <height>50</height>
                    <label>[B]$INFO[Container.Property(GameDate)][/B]</label>
                    <font>nhlgcfont14</font>
                    <textcolor>DDFFFFFF</textcolor>
                    <scroll>false</scroll>
                    <align>left</align>
                </control>
                <control type="list" id="1100">
                    <description>Games list</description>
                    <posy>60</posy>
                    <width>1500</width>
                    <height>1000</height>
                    <visible>true</visible>
                    <onup>2</onup>
                    <ondown>3</ondown>
                    <onleft>1</onleft>
                    <onright>1</onright>
                    <viewtype>list</viewtype>
                    <orientation>vertical</orientation>
                    <pagecontrol>25</pagecontrol>
                    <scrolltime tween="sine" easing="out">200</scrolltime>
                    <itemlayout width="1500" height="60">
                        <control type="image">
                            <description>away team logo</description>
                            <width>100</width>
                            <height>50</height>
                            <info>ListItem.Property(AwayLogo)</info>
                        </control>
                        <control type="label">
                            <description>away team name</description>
                            <posx>110</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Property(AwayName)</info>
                        </control>
                        <control type="label">
                            <description>away team score</description>
                            <posx>300</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(AwayScore)</info>
                        </control>
                        <control type="label">
                            <description>game progress</description>
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(GameProgress)</info>
                        </control>
                        <control type="label">
                            <description>game state</description>
                            <posx>550</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(GameState)</info>
                        </control>
                        <control type="label">
                            <description>home team score</description>
                            <posx>600</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(HomeScore)</info>
                        </control>
                        <control type="label">
                            <description>home team name</description>
                            <posx>700</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Property(HomeName)</info>
                        </control>
                        <control type="image">
                            <description>home team logo</description>
                            <posx>900</posx>
                            <posy>3</posy>
                            <width>100</width>
                            <height>50</height>
                            <info>ListItem.Property(HomeLogo)</info>
                        </control>
                    </itemlayout>
                    <focusedlayout height="60" width="1500">
                        <control type="image">
                            <description>away team logo</description>
                            <width>100</width>
                            <height>50</height>
                            <info>ListItem.Property(AwayLogo)</info>
                        </control>
                        <control type="label">
                            <description>away team name</description>
                            <posx>110</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Property(AwayName)</info>
                        </control>
                        <control type="label">
                            <description>away team score</description>
                            <posx>300</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(AwayScore)</info>
                        </control>
                        <control type="label">
                            <description>game progress</description>
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(GameProgress)</info>
                        </control>
                        <control type="label">
                            <description>game state</description>
                            <posx>550</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(GameState)</info>
                        </control>
                        <control type="label">
                            <description>home team score</description>
                            <posx>600</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Property(HomeScore)</info>
                        </control>
                        <control type="label">
                            <description>home team name</description>
                            <posx>700</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Property(HomeName)</info>
                        </control>
                        <control type="image">
                            <description>home team logo</description>
                            <posx>900</posx>
                            <posy>3</posy>
                            <width>100</width>
                            <height>50</height>
                            <info>ListItem.Property(HomeLogo)</info>
                        </control>
                    </focusedlayout>
                </control>
                <!-- end list -->
                <control type="videowindow" id="2">
                    <description>game video</description>
                    <posx>1300r</posx>
                    <posy>100</posy>
                    <width>1280</width>
                    <height>720</height>
                    <visible>true</visible>
                </control>
            </control>
        </control>
    </controls>
</window>

please advise with tips, suggestions and comments.

Thanks


RE: please help - list selected item - ronie - 2013-09-23

1. code looks ok, so no idea. you've forgot to define posx for the list container.. though i doubt that would cause the issue.
2. you can use a different textcolor in the focused layout or add a background image for the listitem in the focusedlayout.


please help - list selected item - pecinko - 2013-09-24

Try using different textcolors for focused layout or add a image (button) to a focusedlayout, that would show up as a selector.

Btw, where is you control 1000 that you define as default in window properties? Your list is using id=1100.


RE: please help - list selected item - canucks - 2013-09-24

thanks for the reply and tips. since it was a simple gui, I've decided to start from scratch taking little steps at a time, and it is much better.

I do have another question, since confluence is the default skin. would it be possible to reference its texture and re-use it?


RE: please help - list selected item - ronie - 2013-09-24

(2013-09-24, 16:58)canucks Wrote: thanks for the reply and tips. since it was a simple gui, I've decided to start from scratch taking little steps at a time, and it is much better.

I do have another question, since confluence is the default skin. would it be possible to reference its texture and re-use it?

you can, but than it will only work in confluence and not in other skins.
best is to supply your own graphics with the addon.


RE: please help - list selected item - canucks - 2013-09-24

thanks for the reply and tips. since it was a simple gui, I've decided to start from scratch taking little steps at a time, and it is much better.

I do have another question, since confluence is the default skin. would it be possible to reference its texture and re-use it?