help with panel control
#1
I am having a little trouble with the home.xml i am working on. I havent used the panel control yet and am assuming i am doing something incorrectly. The home screen is displayed correctly except for the ListItem.Icon is not showing up (i have tried it without the mask to no avail). And the ListItem.Label has horizontal alignment issues. It seems to be shifted to the left.

Any help would be appreciated. I am sure i am doing something stupid.


Here is the xml:

Code:
<window id="0">
<defaultcontrol>300</defaultcontrol>
<allowoverlay>no</allowoverlay>

<controls>

  <!-- Main Menu Background -->
  <control type="image">
    <width>1920</width>
    <height>1080</height>
    <posx>0</posx>
    <posy>0</posy>
    <texture>backgrounds/bg_white.jpg</texture>
  </control>
  
  <!-- Title Bar -->
  <control type="image">
    <width>1920</width>
    <height>146</height>
    <posx>0</posx>
    <posy>0</posy>
    <texture>home/home_titlebar_bg.png</texture>
  </control>
  <control type="image">
    <width>217</width>
    <height>42</height>
    <posx>200</posx>
    <posy>40</posy>
    <texture>home/home_logo.png</texture>
  </control>
  

  <!-- Main Menu Panel -->
  <control type="panel" id="300">
    <description>Home Menu</description>
    <posx>60</posx>
    <posy>50</posy>
    <width>1800</width>
    <height>680</height>
    <visible>-</visible>
    <onup>300</onup>
    <ondown>300</ondown>
    <onleft>300</onleft>
    <onright>300</onright>
    <scrolltime>200</scrolltime>
    <orientation>horizontal</orientation>
    
    <!-- Non Focused Layout -->
    <itemlayout height="340" width="450">
      <control type="group">
        <posx>25</posx>
        <posy>25</posy>
        <width>400</width>
        <height>290</height>
        <control type="image">
          <description></description>
          <posx>0</posx>
          <posy>0</posy>
          <width>400</width>
          <height>225</height>
          <visible>true</visible>
          <fadetime>200</fadetime>
          <info>ListItem.Icon</info>
          <texture diffuse="home/home_item_mask.png"></texture>
          <aspectratio>keep</aspectratio>
        </control>
        <control type="image">
          <description></description>
          <posx>0</posx>
          <posy>225</posy>
          <width>400</width>
          <height>65</height>
          <visible>true</visible>
          <fadetime>200</fadetime>
          <texture>home/home_item_labelbg_unselected.png</texture>
          <aspectratio>keep</aspectratio>
        </control>
        <control type="label">
          <posx>0</posx>
          <posy>220</posy>
          <width>250</width>
          <height>65</height>
          <visible>true</visible>
          <align>center</align>
          <aligny>center</aligny>
          <scroll>false</scroll>
          <info>ListItem.Label</info>
          <number></number>
          <haspath>false</haspath>
          <font>Home_Item_Label</font>
          <textcolor>Grey</textcolor>
          <wrapmultiline>false</wrapmultiline>
        </control>
      </control>
      
      
    </itemlayout>

    <!-- Focused Layout -->
    <focusedlayout height="340" width="450">
      <control type="image">
        <description></description>
        <posx>25</posx>
        <posy>25</posy>
        <width>400</width>
        <height>225</height>
        <visible>true</visible>
        <fadetime>200</fadetime>
        <info>ListItem.Icon</info>
        <texture diffuse="home/home_item_mask.png"></texture>
        <aspectratio>keep</aspectratio>
      </control>
      <control type="image">
        <description></description>
        <posx>25</posx>
        <posy>250</posy>
        <width>400</width>
        <height>65</height>
        <visible>true</visible>
        <fadetime>200</fadetime>
        <texture>home/home_item_labelbg_selected.png</texture>
        <aspectratio>keep</aspectratio>
      </control>
      <control type="label">
        <posx>25</posx>
        <posy>250</posy>
        <width>250</width>
        <height>65</height>
        <visible>true</visible>
        <align>center</align>
        <aligny>center</aligny>
        <scroll>false</scroll>
        <info>ListItem.Label</info>
        <number></number>
        <haspath>false</haspath>
        <font>Home_Item_Label</font>
        <textcolor>White</textcolor>
        <wrapmultiline>false</wrapmultiline>
      </control>
    </focusedlayout>
        
    <!-- Content -->
    <content>
      <item id="1">
        <description>Movies</description>
        <label>$LOCALIZE[31000]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>XBMC.ActivateWindow(MyVideoLibrary,movietitles,return)</onclick>
      </item>
      <item id="2">
        <description>Music</description>
        <label>$LOCALIZE[2]</label>
        <icon>home/home_itembg_music.jpg</icon>
        <onclick>xbmc.activatewindow(5)</onclick>
      </item>
      <item id="3">
        <description>TV Shows</description>
        <label>TV Shows</label>
        <icon>home/home_itembg_tvshows.jpg</icon>
        <onclick>XBMC.ActivateWindow(MyVideoLibrary,tvshowtitles,return)</onclick>
      </item>
      <item id="4">
        <description>Programs</description>
        <label>$LOCALIZE[0]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(1)</onclick>
      </item>
      <item id="5">
        <description>Favourites</description>
        <label>$LOCALIZE[1036]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(favourites)</onclick>
      </item>
      <item id="8">
        <description>Scripts</description>
        <label>$LOCALIZE[247]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(Scripts)</onclick>
      </item>
      <item id="6">
        <description>Weather</description>
        <label>$LOCALIZE[8]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(2600)</onclick>
        <visible>System.HasNetwork</visible>
      </item>
      <item id="7">
        <description>Files</description>
        <label>$LOCALIZE[7]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(3)</onclick>
      </item>
      <item id="9">
        <description>Settings</description>
        <label>$LOCALIZE[5]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>xbmc.activatewindow(settings)</onclick>
      </item>
      <item id="10">
        <description>Refresh</description>
        <label>$LOCALIZE[184]</label>
        <icon>home/home_itembg_movies.jpg</icon>
        <onclick>XBMC.ReloadSkin()</onclick>
      </item>
    </content>
  </control>
  
</controls>
  
</window>




EDIT: FOR ANYONE ELSE THIS MIGHT HELP, I DID NOT UNDERSTAND THAT THE xpos OF OF A LABEL WITH align SET TO CENTER MUST BE 1/2 THE LABEL WIDTH IF YOU REALLY WANT THE LABEL TO BE CENTERED IN THE "BOX" YOU CREATE WITH THE LABEL WIDTH AND HEIGHT PROPERTIES.

EDIT: THE MISSING ICONS APPEARED ONCE I CHANGED THEM TO ListItem.Thumb AND SET THE thumb PROPERTY IN THE CONTENT SECTION
Reply
#2
Don't use <info> and <texture>. Use just <texture>

Similarly, remove all the label stuff that you aren't using (eg <number>)

Note the positioning and width you have on the label also.

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

Logout Mark Read Team Forum Stats Members Help
help with panel control0