Still struggling with views (code inside)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #1
I can't get a new view for TV Shows working in my skin, and I can't figure out why.

Here is my include

Code:
<include name="tvserieslist">

<control type="group">
    <posx>0</posx>
    <posy>0</posy>
    <width>1920</width>
    <height>1080</height>
    <visible>Control.IsVisible(52)</visible>
    
    <control type="image">
        <description>White Background</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>1920</width>
        <height>1080</height>
        <texture>whiteback.jpg</texture>
        <aspectratio>-</aspectratio>
    </control>
    
    <control type="image">
        <posx>17</posx>
        <posy>72</posy>
        <width>1884</width>
        <height>3</height>
        <aspectratio>stretch</aspectratio>
        <texture>widesep.png</texture>        
    </control>
  
    <control type="label">
        <posx>30</posx>
        <posy>30</posy>
        <font>Large</font>
        <textcolor>Black</textcolor>
        <label>TV Shows</label>        
    </control>
    
    <description>TV Shows Wraplist</description>
    <control type="wraplist" id="52">
        <visible>Container.Content(tvshows)</visible>
        <orientation>vertical</orientation>
        <posx>10</posx>
        <posy>200</posy>
        <width>680</width>
        <height>550</height>
        <onleft>52</onleft>
        <onright>52</onright>
        <onup>52</onup>
        <ondown>52</ondown>
        <viewtype label="tvshowlist">wraplist</viewtype>
        <scrolltime>200</scrolltime>
        <itemlayout width="600" height="30">
        <control type="label">
            <posx>0</posx>
            <posy>40</posy>
            <width>600</width>
            <height>30</height>
            <font>Small</font>
            <textcolor>Black</textcolor>
            <info>ListItem.TVShowTitle</info>
        </control>
        </itemlayout>
        <focusedlayout width="600" height="40">
        <control type="label">
            <posx>0</posx>
            <posy>0</posy>
            <width>600</width>
            <height>40</height>
            <font>Large</font>
            <textcolor>Black</textcolor>
            <info>ListItem.TVShowTitle</info>
        </control>
        </focusedlayout>
        <focusposition>0</focusposition>
    </control>    
</control>
</include>

and here is my MyVideoNav.xml

Code:
<window id="6">
<defaultcontrol>50</defaultcontrol>
<allowoverlay>no</allowoverlay>
<views>50,51,52</views>

<controls>
<control type="label">
    <include>WindowID</include>
    <label>MyVideoNav.xml</label>
  </control>
  
    <control type="grouplist" id="9000">
        <posx>10</posx>
        <posy>40</posy>
        <width>150</width>
    <height>480</height>
        <itemgap>2</itemgap>
    <onleft>50</onleft>
    <onright>50</onright>
        <onup>9000</onup>
    <ondown>9000</ondown>
        <orientation>vertical</orientation>
        <control type="button" id="2">
            <description>View</description>
      <width>150</width>
      <textcolor>White</textcolor>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
        </control>
        <control type="button" id="3">
            <description>Sort</description>
            <width>150</width>
      <textcolor>White</textcolor>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
        </control>
        <control type="togglebutton" id="4">
            <description>Ascending</description>
      <width>150</width>
      <label>$LOCALIZE[584]</label>
      <altlabel>$LOCALIZE[585]</altlabel>
            <textcolor>White</textcolor>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <alttexturenofocus border="1">ButtonNF.png</alttexturenofocus>
      <alttexturefocus border="1">ButtonFo.png</alttexturefocus>
        </control>
    <control type="button" id="99">
      <description>Files</description>
      <label>$LOCALIZE[744]</label>
      <width>150</width>
      <textcolor>White</textcolor>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
      <onclick>replacewindow(myvideofiles)</onclick>
      <onclick>setfocus(99)</onclick>
      <selected>window.isvisible(myvideolibrary)</selected>
    </control>
    <control type="button" id="8">
      <description>Search</description>
      <label>$LOCALIZE[137]</label>
      <width>150</width>
      <textcolor>White</textcolor>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
    </control>
    <control type="button" id="9">
      <description>IMDB</description>
      <label>$LOCALIZE[368]</label>
      <width>150</width>
      <textcolor>White</textcolor>
      <texturefocus border="1">ButtonFo.png</texturefocus>
      <texturenofocus border="1">ButtonNF.png</texturenofocus>
    </control>
    </control>
    
<include>list</include>
<include>movielist</include>
<include>tvserieslist</include>
    
</controls>
  
</window>

I am entering the TV Shows page directly from the home screen with

Code:
<item id="2">
                <description>TV Shows</description>
                <label>TV Shows</label>
                <onclick>xbmc.activatewindow(videolibrary,tvshowtitles)</onclick>
            </item>

Can anyone help?
find quote
ekim232 Offline
Posting Freak
Posts: 1,206
Joined: Nov 2008
Reputation: 5
Location: Chicago, IL
Post: #2
Does the view have it's own xml? If so you need to add it to includes.xml. Might be one problem.
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #3
No I've put the view into Commonviews.xml

The first view I made for my Movies is working fine I just can't figure out what's wrong.
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #4
Put <focusposition>0</focusposition> above <scrolltime>

Not sure if <description>TV Shows Wraplist</description> where it's at screws things up but put that under <control type="wraplist" id="52">

Those were two things I quickly noticed

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
ekim232 Offline
Posting Freak
Posts: 1,206
Joined: Nov 2008
Reputation: 5
Location: Chicago, IL
Post: #5
Try changing the visibilty on the wraplist to movies and see if it appears. Make sure you have a tv show library as well.
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #6
Moved those two things and still not working....
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #7
ekim232 Wrote:Try changing the visibilty on the wraplist to movies and see if it appears. Make sure you have a tv show library as well.

Nope doesn't work if I change it to movies, I still get my original movies view...I do have a TV Show library lol
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #8
Try changing:

<viewtype label="tvshowlist">wraplist</viewtype>

to
<viewtype label="tvshowlist">list</viewtype>

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #9
That did the trick mcborzu!

Can I just ask what the word inbetween </viewtype label="tvshowlist"></viewtype> does anyway? Can it be anything?
find quote
Hitcher Online
Skilled Skinner
Posts: 10,748
Joined: Aug 2007
Reputation: 98
Location: Eastleigh, UK
Post: #10
Shouldn't MyVideoNav's window id should be 25?
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #11
Yeah I think it has changed to 25 but 6 still works Smile
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #12
Please don't use hardcoded window id's - use the window name instead.

I don't want skins to break if we go and change stuff around!

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: badge.gif]
find quote
`Black Offline
Team-Kodi Member
Posts: 2,433
Joined: Apr 2009
Reputation: 72
Location: Germany
Post: #13
<window id="25"></window>

I don't think you can enter a name there? He used 6 instead of 25.

Or is <window id="videolibrary"></window> also possible?

[Image: xp1080-21.png]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #14
XBMC completely ignores any id="" in normal windows. What I mean is that you shouldn't reference them by id (i.e. ActivateWindow(25) is a bad idea).

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: badge.gif]
find quote
Advocate Offline
Senior Member
Posts: 117
Joined: Mar 2009
Reputation: 0
Location: Hartlepool, United Kingdom
Post: #15
No I always open windows by calling their name ie xbmc.activatewindow(videolibrary,tvshowtitles)

Is that right?
find quote