Adding a new viewtype
#1
Hello.

Earlier today I installed xbmc Frodo and also the Aeon Nox skin. Shortly after getting inside and playing around a bit, I also installed the advanced launcher add-on to put my emulators and roms onto my media pc. Once all that was complete, I proceded to set the program view to Showcase2 (which I think is the square variation) and continued setting up the UI.

As I progressed, a couple things irked me and I decided to edit the view to be more to my liking. Using the Viewtype_ShowcaseSquare.xml as a template, I increased the size of the thumbnails to match snes carts, relocated the side thumbnails further to the left and right of the thumbnail with focus, and altered the animation settings between the various positions. All in all, it works great.

My question is, how can I clone this particular xml to be a new viewtype that I can select from the view list? I'd like to keep this custom view separate and potentially create future variations based upon different consoles. I've scoured the forums this evening and had very little luck with determining the best way to go about this. I followed a thread here: http://forum.xbmc.org/showthread.php?tid=68830 for awhile, but unfortunately was unable to get it to work (using the YoMamma example code in the second post).

The most I have been able to deduce is that I need to assign a fresh ID in the viewtype, reference it in the <includes>, and also add it to the views list for the MyPrograms.xml. I'm assuming MyPrograms since it is advance launcher that I want to use the viewtype through. Despite this information, I cannot find a clear concise method of properly getting this to show up in the view listing inside Advance Launcher.

Any help would be greatly appreciated.

Thank you,
D
Reply
#2
You must assign it a new id (for example, ShowcaseSquare has id=509), and a new name as well (search for "viewtype label"). You also have to add the XML file name in includes.xml, similarly to this:
Code:
<include file="Viewtype_ShowcaseSquare.xml" />

This id must be added in MyPrograms.xml in the <views> tag. It must be added in SkinSettings.xml, similarly to this:
Code:
<control type="radiobutton" id="481">
                        <label>$LOCALIZE[31028] ($LOCALIZE[20360],$LOCALIZE[24001])</label>
                        <include>Default_SettingRadioButtonShort</include>
                        <onclick>Skin.ToggleSetting(DisableShowCaseSquareVL)</onclick>
                        <selected>!Skin.HasSetting(DisableShowCaseSquareVL)</selected>
                    </control>

Finally, it must be added in Includes_MediaMenu.xml, in a way such a this:
Code:
<onclick condition="Control.IsVisible(509)">SetProperty(actualViewtype,ShowcaseSquare,home)</onclick>

Of course, since you'll be assigning it a new id, you'll have to add it in pretty much all the options in custom_1126_ViewtypeSettings.xml. so look for
Code:
Stringcompare(Window(home).Property(actualViewtype),ShowcaseSquare)
and add your viewtype next to it.

I'm sure I'm forgetting something, if it comes to mind I'll post it.
Reply
#3
This is exactly what I've been looking for (a way to add a new viewtype to the advanced launcher portion of the Aeon Nox skin that showcases thums in dvd size (not square) and SNES/N64 boxart dimensions). Can you please share what it was that you edited inside the Viewtype_ShowcaseSquare.xml to get this?

Edit: I went ahead and changed each "height" value by adding 99 to each one I found in the Viewtype_ShowcaseSquare.xml. This seemed to get my desired result.
Reply
#4
thank you,
i have been trying to figure this out also. this cleared up a lot of confusion for me.
Reply
#5
I was able to get the desired dimensions for my thumbnails, but like the OP, I would like to have 2 custom views added to the list of viewtypes as well. I tried following CutSickAss' method above (thanks for that, btw) but I'm seeing nothing in the options that would display an additional viewtype. I'm new to XBMC but not new to XML Code. However, after several frustrating attempts, I thought it might be easier to just ask the pros. This post is probably the longest post I've ever written (and I've written some long ones), so I apologize in advance for that. But I thank anyone who even takes the time to read it...

Viewtype_Games1.xml
Copied Viewtype_ShowcaseSquare.xml to the desktop (I intend to use this as my template)
Inside Viewtype_ShowcaseSquare.xml, I edited ALL 509 (id=509) to 520...making 520 my ID for this particular viewtype.
I searched for "viewtype label" and found:
Code:
<viewtype label="31029">bigwrap</viewtype>
^^One instance I kept this the same. The other I changed the "31029" number to a random one.^^ (neither worked)
I then saved the new xml document as: Viewtype_Games1.xml

Includes.xml
Inside the Includes.xml, I added the new xml file name to the list:
Code:
<include file="Viewtype_Games1.xml" />
...I did notice that the 509 ID was mentioned below, but left the rest of the document alone. (i.e.: didn't add any tags for 520)

MyPrograms.xml
I added 520 to the <views> tag in MyPrograms.xml:
<views>50,52,53,57,500,509,501,505,511,512,560,518,520</views>
After my first failed attempt, I included "Games1" in the <control type="group"> list:
Code:
<control type="group">
                <include>CommonRootView</include>
                <include>ShowcaseQuadrate</include>
                <include>Showcase</include>
                <include>Games1</include>   <-------------------------------
                <include>AddonWall</include>
                <include>Viewtype_Wall</include>
                <include>ShiftView</include>
                <include>Viewtype_FullscreenPanel</include>
                <include>TriPanel</include>
                <include>TriPanelSquare</include>
                <include>LowList</include>
            </control>
I also added | Control.IsVisible(520) right after: | Control.IsVisible(509) for further troubleshooting.

SkinSettings.xml
In the SkinSettings.xml, I added this:
Code:
<control type="radiobutton" id="484">
                        <label>$LOCALIZE[31028] ($LOCALIZE[20360],$LOCALIZE[24001])</label>
                        <include>Default_SettingRadioButtonShort</include>
                        <onclick>Skin.ToggleSetting(DisableGames1VL)</onclick>
                        <selected>!Skin.HasSetting(DisableGames1VL)</selected>
                    </control>
^^I chose id="484" b/c that number didn't seem to be utilized elsewhere.^^

Includes_MediaMenu.xml
Inside Includes_MediaMenu.xml, I included this tag in it's proper ascending order, according to ID (520)
Code:
<onclick condition="Control.IsVisible(520)">SetProperty(actualViewtype,Games1,home)</onclick>

Custom_1126_ViewtypeSettings.xml:
Now this is probably where I had the most confusion.
I added:
Code:
|  Stringcompare(Window(home).Property(actualViewtype),Games1)
to the list along w/ the other viewtypes.
I also saw two other instances of the "Stringcompare" tag lower down in the xml document, so I added mine:
Code:
<visible>Stringcompare(Window(home).Property(actualViewtype),ShowcaseSquare)</visible>
                    <visible>Stringcompare(Window(home).Property(actualViewtype),Games1)</visible>
^^which was listed under:
<onclick>Skin.ToggleSetting(noflowalbum)</onclick>
<selected>Skin.HasSetting(noflowalbum)</selected>


...and
Code:
<visible>Stringcompare(Window(home).Property(actualViewtype),ShowcaseSquare) + Container.Content(albums)</visible>
                    <visible>Stringcompare(Window(home).Property(actualViewtype),Games1) + Container.Content(albums)</visible>
^^which was listed under:
<onclick>Skin.ToggleSetting(usecasescd)</onclick>
<selected>!Skin.HasSetting(usecasescd)</selected>


Again, sorry for the novel-like n00bie post that could rival the thickness of a Webster's Dictionary. Here's hoping someone can point out my mistakes.

*edited .XML documents using Dreamweaver
Reply
#6
Harpua, did you ever figure out your issue? I've been playing with this again and still can't get it to work. Even with the kodi explanation of how to add a viewtype.

Thanks,
Dave
Reply
#7
Whew. After I don't know how long I finally figured out how to make this work in Kodi 14.2. I first created a custom view for advanced launcher, specifically for proper box sizes of psp games. Rearranged a lot of the screen elements and created a standard background image for the view while maintaining a standard fanart display in the upper right. Next up will be SNES.

Image
Reply
#8
Verry nice work
Reply

Logout Mark Read Team Forum Stats Members Help
Adding a new viewtype0