I have edited ViewType_File Mode.xml - now how can I turn it into another view?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Banditt Offline
Junior Member
Posts: 48
Joined: Mar 2011
Reputation: 0
Post: #1
I am just learning how to edit the skins. My goal is to have an additional view for the programs section. I have edited the file: ViewType_File Mode.xml (which is below).

My question is: This replaces any section where I am browsing files and I only want it to be in the programs section. How can I add it as another view (named differently) in programs so I can switch between the default file list and this view?

I believe I need to edit this page, MyPrograms.xml, and Include_Views.xml but this is where I get stuck. Any help at all would be appreciated.

Code:
<includes>
  <!-- list id="50" -->
  <include name="Viewtype-File Mode">
    <control type="group">
      <visible>Control.IsVisible(50)</visible>
      <include>CommonViewAnimations</include>
        <control type="image">
            <description>Back Panel</description>
            <posx>0</posx>
            <posy>0</posy>
            <width>1280</width>
            <height>720</height>
            <texture>views/pictures/panels/panel.png</texture>
            <aspectratio>stretch</aspectratio>
        </control>
    
        <control type="image">
            <description>Screenshot</description>
            <posx>793</posx>
            <posy>103</posy>
            <width>380</width>
            <height>360</height>
            <texture background="true">$INFO[Listitem.Property(Fanart_Image)]</texture>
            <aspectratio>keep</aspectratio>
            <fadetime>200</fadetime>
        </control>
                <control type="image">
            <description>Wheel</description>
            <posx>793</posx>
            <posy>473</posy>
            <width>380</width>
            <height>130</height>
            <texture background="true">$INFO[ListItem.Thumb ]</texture>
            <aspectratio>keep</aspectratio>
            <fadetime>200</fadetime>
        </control>


      <control type="list" id="50">
        <visible>Window.IsVisible(MusicFiles) | Window.IsVisible(VideoFiles) | Window.IsVisible(Programs) | Window.IsVisible(Scripts) | Window.IsVisible(AddonBrowser.xml)</visible>
                <posx>0</posx>
                <posy>72</posy>
                <height>550</height>
                <width>1280</width>
                <pagecontrol>70</pagecontrol>
                <preloaditems>2</preloaditems>
                <onleft>9010</onleft>
                <onright>70</onright>
                <onup>50</onup>
                <ondown>50</ondown>
                <viewtype label="FileMode Panel">FileMode Panel for file mode</viewtype>
                <scrolltime>0</scrolltime>
                <itemlayout height="54.9">
                <!-- Labels Title -->
                    <control type="label">
                        <posx>85</posx>
                        <posy>0</posy>
                        <width>661</width>
                        <height>54.9</height>
                        <font>Mediumhack</font>
                        <align>left</align>
                        <label>$INFO[ListItem.Label]</label>
                        <textcolor>lightgrey</textcolor>
                        <scroll>false</scroll>
                    </control>
          <!-- Thumb left side -->
        </itemlayout>
        <focusedlayout height="54.9">
         <control type="image">
                        <posx>55</posx>
                        <posy>0</posy>
                        <width>691</width>
                        <height>56</height>
                        <texture>views/pictures/other/list_fo.png</texture>
                        <aspectratio>stretch</aspectratio>
                    </control>
          <!-- Thumb left side -->
                    <control type="label">
                        <posx>85</posx>
                        <posy>0</posy>
                        <width>661</width>
                        <height>54.9</height>
                        <font>Mediumhack</font>
                        <align>left</align>
                        <label>$INFO[ListItem.Label]</label>
                        <textcolor>lightgrey</textcolor>
                        <scroll>false</scroll>
                    </control>

        </focusedlayout>
      </control>
      <!--Scrollbar-->
        <control type="scrollbar" id="70">
                <description>Scrollbar</description>
                <posx>689</posx>
                <posy>40</posy>
                <width>98</width>
                <height>619</height>
                <visible>true</visible>
                <onleft>50</onleft>
                <onright>50</onright>
                <textureslidernib>views/pictures/other/scrollbar_bar.png</textureslidernib>
                <textureslidernibfocus>views/pictures/other/scrollbar_bar_nib.png</textureslidernibfocus>
                <pulseonselect>true</pulseonselect>
                <orientation>vertical</orientation>
                <showonepage>false</showonepage>
                <onup>2</onup>
                <ondown>3</ondown>
            </control>

    </control>
  </include>
</includes>
find quote
`Black Offline
Team-XBMC Member
Posts: 2,392
Joined: Apr 2009
Reputation: 66
Location: Germany
Post: #2
Change the id (should not be used by any other view), add it to line 4 in MyPrograms.xml and add the view xml to include_views.xml.

[Image: xp1080-21.png]
find quote
Banditt Offline
Junior Member
Posts: 48
Joined: Mar 2011
Reputation: 0
Post: #3
Thank you for your response.

I believe I did what you said, but it is still just going to the FileMode view and no ability to change it.

I renamed my file to: Viewtype_Game.xml

I edited MyPrograms:
Code:
<window id="1">
        <defaultcontrol always="true">50</defaultcontrol>
        <allowoverlay>no</allowoverlay>
        <view>68</view>
        <controls>

I edited Include_Views.xml and on line 15 put:
Code:
<include file="Viewtype_Game.xml" />

Do I need to add something here:
Code:
        <include name="Other-Views">
            <include>Viewtype-File Mode</include>
            <include>Viewtype-Walls</include>
        </include>

Here is my Viewtype_Game.xml
Code:
<includes>
  <!-- list id="68" -->
  <include name="Viewtype-Game">
    <control type="group">
      <visible>Control.IsVisible(68)</visible>
      <include>CommonViewAnimations</include>
      <control type="image">
        <description>Back Panel</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>1280</width>
        <height>720</height>
        <texture>views/pictures/panels/panel.png</texture>
        <aspectratio>stretch</aspectratio>
      </control>
      <control type="image">
        <description>Screenshot</description>
        <posx>793</posx>
        <posy>103</posy>
        <width>380</width>
        <height>360</height>
        <texture background="true">$INFO[Listitem.Property(Fanart_Image)]</texture>
        <aspectratio>keep</aspectratio>
        <fadetime>200</fadetime>
      </control>
      <control type="image">
        <description>Wheel</description>
        <posx>793</posx>
        <posy>473</posy>
        <width>380</width>
        <height>130</height>
        <texture background="true">$INFO[ListItem.Thumb ]</texture>
        <aspectratio>keep</aspectratio>
        <fadetime>200</fadetime>
      </control>
      <control type="list" id="68">
        <visible>Window.IsVisible(MusicFiles) | Window.IsVisible(VideoFiles) | Window.IsVisible(Programs) | Window.IsVisible(Scripts) | Window.IsVisible(AddonBrowser.xml)</visible>
        <posx>0</posx>
        <posy>72</posy>
        <height>550</height>
        <width>1280</width>
        <pagecontrol>70</pagecontrol>
        <preloaditems>2</preloaditems>
        <onleft>9010</onleft>
        <onright>70</onright>
        <onup>68</onup>
        <ondown>68</ondown>
        <viewtype label="Game Panel">FileMode Panel for file mode</viewtype>
        <scrolltime>0</scrolltime>
        <itemlayout height="54.9">
          <!-- Labels Title -->
          <control type="label">
            <posx>85</posx>
            <posy>0</posy>
            <width>661</width>
            <height>54.9</height>
            <font>Mediumhack</font>
            <align>left</align>
            <label>$INFO[ListItem.Label]</label>
            <textcolor>lightgrey</textcolor>
            <scroll>false</scroll>
          </control>
          <!-- Thumb left side -->
        </itemlayout>
        <focusedlayout height="54.9">
          <control type="image">
            <posx>55</posx>
            <posy>0</posy>
            <width>691</width>
            <height>56</height>
            <texture>views/pictures/other/list_fo.png</texture>
            <aspectratio>stretch</aspectratio>
          </control>
          <!-- Thumb left side -->
          <control type="label">
            <posx>85</posx>
            <posy>0</posy>
            <width>661</width>
            <height>54.9</height>
            <font>Mediumhack</font>
            <align>left</align>
            <label>$INFO[ListItem.Label]</label>
            <textcolor>lightgrey</textcolor>
            <scroll>false</scroll>
          </control>
        </focusedlayout>
      </control>
      <!--Scrollbar-->
      <control type="scrollbar" id="70">
        <description>Scrollbar</description>
        <posx>689</posx>
        <posy>40</posy>
        <width>98</width>
        <height>619</height>
        <visible>true</visible>
        <onleft>68</onleft>
        <onright>68</onright>
        <textureslidernib>views/pictures/other/scrollbar_bar.png</textureslidernib>
        <textureslidernibfocus>views/pictures/other/scrollbar_bar_nib.png</textureslidernibfocus>
        <pulseonselect>true</pulseonselect>
        <orientation>vertical</orientation>
        <showonepage>false</showonepage>
        <onup>2</onup>
        <ondown>3</ondown>
      </control>
    </control>
  </include>
</includes>
find quote
`Black Offline
Team-XBMC Member
Posts: 2,392
Joined: Apr 2009
Reputation: 66
Location: Germany
Post: #4
<view>68</view> should be <view>50,68</view>. You should be able to change the view in the options menu then. And yes, you need to add <include>Viewtype-Game</include> to the other-views include. Smile

[Image: xp1080-21.png]
find quote