Kodi Community Forum

Full Version: Focus and visibility problem.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Back again Blush I'm still playing and learning loads, but I've got myself stumped.

I have a right justified list to show the albums stored on my unraid server, it shows the album title and the artists name shown below the title.

When I click on a given album it shows the track with the duration below.

The problem I'm having is when I right click on an album title or a song title the text for the album disappears when the dialog box opens up.

The non album / title text for doesn't show up either ie .. and all albums text for example when selecting songs via year, the .. don't show up either at the top of the list.

What am I missing, is it to do with loss of focus (dialog window popping up) and visibility conditions (non album / title text) I cant seem to figure it out or its staring me in the face and I'm missing it.

I have this problem on a video layout also, so would like to figure oiut what I've missed.

Any pointers?

Thanks in advance.

Code:
            <control type="list" id="560">
                <posx>580r</posx>
                <posy>90</posy>
                <width>600</width>
                <height>590</height>
                <onleft>2</onleft>
                <onup>560</onup>
                <ondown>560</ondown>
                <onright>60</onright>
                <viewtype label="31338">list</viewtype>
                <pagecontrol>60</pagecontrol>
                <scrolltime>200</scrolltime>
                <visible>Container.Content(Albums) | Container.Content(Songs)</visible>
                <itemlayout height="60" width="580">
                    <control type="image">
                        <description>The Orange Line</description>
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </itemlayout>
                <focusedlayout height="60" width="580">
                    <control type="image">
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>                
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </focusedlayout>
            </control>
Try to add for example:

<selectedcolor>blue</selectedcolor>

to your label control.
Which label control control sorry
In every label, right under the line textcolor.
Hi as you asked and now the line does go blue instead of disappearing now when i right click on a item, how does this work?

The .. at the top of the menu still don't show up though?

Code:
<control type="group">
            <visible>Control.IsVisible(560)</visible>
            <include>VisibleFadeEffect</include>
            <control type="list" id="560">
                <posx>580r</posx>
                <posy>90</posy>
                <width>600</width>
                <height>590</height>
                <onleft>2</onleft>
                <onup>560</onup>
                <ondown>560</ondown>
                <onright>60</onright>
                <pagecontrol>60</pagecontrol>
                <scrolltime>200</scrolltime>
                <itemlayout height="60" width="580">
                    <control type="image">
                        <description>The Orange Line</description>
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </itemlayout>
                <focusedlayout height="60" width="580">
                    <control type="image">
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>                
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>blue</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </focusedlayout>
            </control>
Check your defaults.xml in case some of the colour controls are blank.

ie
PHP Code:
<selectedcolor>-</selectedcolor
I checked my defaults.xml and the label control had no selectcolor so i added it, but it didn't solve my issue.

The odd thing is if i select the list view the .. are there and there white.

Code:
    <default type="label">
        <posx>80</posx>
        <posy>60</posy>
        <label>-</label>
        <font>font13</font>
        <textcolor>white</textcolor>
        <selectedcolor>blue</selectedcolor>
    </default>
Next thing to check is the colors.xml for the colour blue.
I used orange instead of blue but it was the same result.

I found a solutions of sorts if I replace <label>$INFO[listitem.Album]</label> with <label>$INFO[listitem.label]</label> it shows the .. and if i select years it shows the .. and *All Albums also now shows years and artists where as before they were blank.

A very minor problem comes back of sorts when I click on an album and it shows the track list, I have it to show Song title and duration when <visible>!Container.Content(Albums)</visible> instead of album and artist when <visible>Container.Content(Albums)</visible> (Initial screen). The .. are missing at the top of the track listing, they are also missing from the top if I view all songs.

If I use label in place of Title for <visible>!Container.Content(Albums)</visible> it shows the .. on all songs and track listing but instead of just title I now get Album - Title - Artist I don't want this.

I have to use Label instead of Album to get the certain text to appear ie .. *All Albums, Artists, Names, Years.

Is there any way to format label for the track list an All song list so that the .. shows up?

I'll probably just ignore the fact that the .. are missing in All songs and track listing but it would be nice to know why they missing and what I've done wrong so that I can learn from it.

Thanks in advance and hope this made sense.

default.xml (colors)
Code:
<colors>
    <color name="white">FFFFFFFF</color>
    <color name="grey">FFb4b4b4</color>
    <color name="grey2">FF999999</color>
    <color name="grey3">FF505050</color>
    <color name="black">FF000000</color>
    <color name="blue">FF0084ff</color>
    <color name="orange">FFFFA500</color>
    <color name="selected">FFEB9E17</color>
</colors>

defaults.xml
Code:
    <default type="label">
        <posx>80</posx>
        <posy>60</posy>
        <label>-</label>
        <font>font13</font>
        <textcolor>white</textcolor>
        <selectedcolor>orange</selectedcolor>
        <shadowcolor>black</shadowcolor>
    </default>

My List
Code:
        <control type="group">
            <visible>Control.IsVisible(560)</visible>
            <include>VisibleFadeEffect</include>
            <control type="list" id="560">
                <description>The Menu</description>
                <posx>580r</posx>
                <posy>90</posy>
                <width>600</width>
                <height>590</height>
                <onleft>2</onleft>
                <onup>560</onup>
                <ondown>560</ondown>
                <onright>60</onright>
                <viewtype label="31338">list</viewtype>
                <pagecontrol>60</pagecontrol>
                <scrolltime>200</scrolltime>
                <visible>Container.Content(Albums) | Container.Content(Songs) | Container.Content(Artists) | Container.Content(Years)</visible>
                <itemlayout height="60" width="580">
                    <control type="image">
                        <description>The Orange Line</description>
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.label]</label><!--Was Albums-->
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums) | Container.Content(Artists) | Container.Content(Years)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </itemlayout>
                <focusedlayout height="60" width="580">
                    <control type="image">
                        <posx>-20</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Album Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.label]</label> <!--Was Albums-->
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums) | Container.Content(Artists) | Container.Content(Years)</visible>
                    </control>
                    <control type="label">
                        <description>Track Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>                
                    <control type="label">
                        <description>Duration</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                </focusedlayout>
            </control>
(2012-10-24, 20:28)Icerat Wrote: [ -> ]I have to use Label instead of Album to get the certain text to appear ie .. *All Albums, Artists, Names, Years.

Isn't that obvious? Wink

Just use another label control for ListItem.Label and add a visible condition -

PHP Code:
<visible>StringCompare(ListItem.Label,..)</visible
Wow now I'm lost lol

I've learnt loads so far but not even seen a StringCompare, how do I use that lol and what's it do, compare Strings of text?