[WIP][MOD] Advanced Launcher support
#1
Part 1 : Add an Games/Advanced Launcher entry into default home page

Image

Step 1 : Open /720p/Includes_Home1.xml file, and add the following code :

Code:
<item id="14">
    <description>Games</description>
    <label>$LOCALIZE[31500]</label>
    <icon>special://skin/extras/home1/games.jpg</icon>
    <thumb>$INFO[Skin.String(CustomGames)]</thumb>
    <onclick>ActivateWindow(Programs,plugin://plugin.program.advanced.launcher,return)</onclick>
    <visible>system.hasaddon(plugin.program.advanced.launcher) + !Skin.HasSetting(NoGames)</visible>
</item>

just after :

Code:
...
<item id="6">
    <description>Pictures</description>
    <label>$LOCALIZE[1]</label>
    <icon>special://skin/extras/home1/pictures.jpg</icon>
    <thumb>$INFO[Skin.String(CustomPictures)]</thumb>
    <onclick>ActivateWindow(Pictures)</onclick>
    <visible>!Skin.HasSetting(NoPictures)</visible>
</item>

Step 2 : Open /language/English/Strings.xml file, and add the following code :

Code:
<!-- New String from Angelscry -->
<string id="31500">Games</string>

just before the last line :

Code:
</strings>

Step 3 : Download and save this image as extras/home1/games.jpg.

Part 2 : Add an Games/Advanced Launcher entry into icon home page

Image

Step 1 : Open /720p/Includes_Home2.xml file, and add the following code :

Code:
<item id="14">
    <description>Games</description>
    <label>$LOCALIZE[31500]</label>
    <icon>special://skin/extras/home2/icon_games.png</icon>
    <thumb>$INFO[Skin.String(CustomGame)]</thumb>
    <onclick>ActivateWindow(Programs,plugin://plugin.program.advanced.launcher,return)</onclick>
    <visible>system.hasaddon(plugin.program.advanced.launcher) + !Skin.HasSetting(NoGames)</visible>
</item>

just after :

Code:
...
<item id="6">
    <description>Pictures</description>
    <label>$LOCALIZE[1]</label>
    <icon>special://skin/extras/home2/icon_pictures.png</icon>
    <onclick>ActivateWindow(Pictures)</onclick>
    <visible>!Skin.HasSetting(NoPictures)</visible>
</item>

Step 2 : If not already done into Part 1, open /language/English/Strings.xml file, and add the following code :

Code:
<!-- New String from Angelscry -->
<string id="31500">Games</string>

just before the last line :

Code:
</strings>

Step 3 : Download and save this image as extras/home2/icon_games.png.
Reply
#2
Part 3 : Add Settings to Show/Hide Games/Advanced Launcher entries into home pages

Image

Step 1 : Open /720p/CustomSettings.xml file, and add the following code :

Code:
<control type="radiobutton" id="412">
    <include>SettingsLabel</include>
    <label>$LOCALIZE[31441] $LOCALIZE[31500]</label>
    <onclick>Skin.ToggleSetting(NoGames)</onclick>
    <selected>Skin.HasSetting(NoGames)</selected>
</control>

Just after :

Code:
...
<control type="radiobutton" id="406">
    <include>SettingsLabel</include>
    <label>$LOCALIZE[31441] $LOCALIZE[1]</label>
    <onclick>Skin.ToggleSetting(NoPictures)</onclick>
    <selected>Skin.HasSetting(NoPictures)</selected>
</control>
Reply
#3
Part 4 : Add Artwork selection for Games/Advanced Launcher home page entry

Image

Step 1 : Open /720p/CustomSettings.xml file, and add the following code :

Code:
<control type="group">
    <visible>Container(9003).HasFocus(15)</visible>
    <control type="button" id="300">
        <description>Single Image button</description>
        <posx>5</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>31275</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.SetPath(CustomGames)</onclick>
        <onleft>302</onleft>
        <onright>301</onright>
        <onup>304</onup>
        <ondown>304</ondown>
    </control>
    <control type="button" id="301">
        <description>Multi Image button</description>
        <posx>190</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>31284</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.SetImage(CustomGames)</onclick>
        <onleft>300</onleft>
        <onright>302</onright>
        <onup>304</onup>
        <ondown>304</ondown>
        </control>
    <control type="button" id="302">
    <description>Default Image button</description>
        <posx>375</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>192</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.Reset(CustomGames)</onclick>
        <onleft>301</onleft>
        <onright>300</onright>
        <onup>304</onup>
        <ondown>304</ondown>
    </control>
</control>

just after :

Code:
...
<control type="group">
    <visible>Container(9003).HasFocus(14)</visible>
    <control type="button" id="300">
        <description>Single Image button</description>
        <posx>5</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>31275</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.SetPath(CustomPlayDisc)</onclick>
        <onleft>302</onleft>
        <onright>301</onright>
        <onup>304</onup>
        <ondown>304</ondown>
    </control>
    <control type="button" id="301">
        <description>Multi Image button</description>
        <posx>190</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>31284</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.SetImage(CustomPlayDisc)</onclick>
        <onleft>300</onleft>
        <onright>302</onright>
        <onup>304</onup>
        <ondown>304</ondown>
        </control>
    <control type="button" id="302">
    <description>Default Image button</description>
        <posx>375</posx>
        <posy>0</posy>
        <width>180</width>
        <height>38</height>
        <label>192</label>
        <font>METF_ContextValue</font>
        <textcolor>SettingsDetail</textcolor>
        <focusedcolor>ButtonText</focusedcolor>
        <align>center</align>
        <aligny>center</aligny>
        <texturefocus>ButtonFo.png</texturefocus>
        <onclick>Skin.Reset(CustomPlayDisc)</onclick>
        <onleft>301</onleft>
        <onright>300</onright>
        <onup>304</onup>
        <ondown>304</ondown>
    </control>
</control>

Next MODs and additional Advanced Launcher supports will follow...
Reply
#4
Hello Angelscry,

Thank you for the changes. They will be included in the Metropolis skin.
I have updated the content for the current git version of the Metropolis skin and will sent a pull request when it will be finished.

Thank you too for your very good addons. (Keep up the good work)
Reply
#5
I just added the Games menu to the stock Metropolis. It's configurable (can point to any program addon) and has a configurable submenu like the other Home items do as well.

I haven't pushed it just yet but it'll be up in a few minutes and will be available in 2.0.0rc3 when it's released.

edit: BTW, I used the images you provided here Angelscry. But since they're copyrighted characters, we probably need to think about replacing them. So... call for an artist! Smile
Reply
#6
(2012-09-15, 02:24)jingai Wrote: I just added the Games menu to the stock Metropolis. It's configurable (can point to any program addon) and has a configurable submenu like the other Home items do as well.

I haven't pushed it just yet but it'll be up in a few minutes and will be available in 2.0.0rc3 when it's released.

edit: BTW, I used the images you provided here Angelscry. But since they're copyrighted characters, we probably need to think about replacing them. So... call for an artist! Smile
I think that for the Home2 view the "Addon" icon will fit more to "Game". For the other views, yes, other iamges will be needed. I have also tried to add "Poster & Fanart" view to programs, but was not able to do it. Only the top part was displayed (Poster and Fanart) but the bottom part (Plot) was missing. Maybe someone could help me on this part... or just show me the way how to do it.

Reply
#7
(2012-09-15, 18:03)Angelscry Wrote:
(2012-09-15, 02:24)jingai Wrote: edit: BTW, I used the images you provided here Angelscry. But since they're copyrighted characters, we probably need to think about replacing them. So... call for an artist! Smile

I think that for the Home2 view the "Addon" icon will fit more to "Game".

Agreed. Opened Issue 180 saying exactly this. Hopefully someone can provide the needed images soon so we can release 2.0.0 with this feature.

(2012-09-15, 18:03)Angelscry Wrote: I have also tried to add "Poster & Fanart" view to programs, but was not able to do it. Only the top part was displayed (Poster and Fanart) but the bottom part (Plot) was missing. Maybe someone could help me on this part... or just show me the way how to do it.

If you send me the modifications you made I can see if I can get it to work. Either a diff or the whole XML file would be fine.
Reply
#8
(2012-09-15, 18:21)jingai Wrote:
(2012-09-15, 18:03)Angelscry Wrote: I have also tried to add "Poster & Fanart" view to programs, but was not able to do it. Only the top part was displayed (Poster and Fanart) but the bottom part (Plot) was missing. Maybe someone could help me on this part... or just show me the way how to do it.

If you send me the modifications you made I can see if I can get it to work. Either a diff or the whole XML file would be fine.
I have decided to create a new view for games based on Viewtype_PosterAndFanart.xml named Viewtype_Games_PosterAndFanart.xml (to avoid to break anyting) with this code : http://pastebin.com/5xPbzjqA

Then I have modified includes.xml to add the view :

Code:
    ...
    <include file="Viewtype_PVR_Recordings.xml" />
    <include file="Viewtype_PVR_EPGSearch.xml" />
    <include file="Viewtype_Games_PosterAndFanart.xml" /> <!-- 950 -->

    <!-- Global dimensions -->
    ...


Then I have modified MyPrograms.xml to include the view :

Code:
<window id="1">
    <views>55,503,58,950</views>
    <defaultcontrol>55</defaultcontrol>
    <allowoverlay>yes</allowoverlay>
    <controls>
        <include>Global_Background</include>
        <include>Viewtype_Files</include>            <!-- 55 -->
        <include>Viewtype_Gallery_Square</include>    <!-- 58 -->
        <include>Viewtype_List</include>            <!-- 503 -->
        <include>Viewtype_Games_PosterAndFanart</include>            <!-- 950 -->
        <include>Global_ContextFilter</include>
        ...

And then modify CustomSettings.xml to activate/desactivate the view :

Code:
                    ...
                    </control>
                    <!-- View 950 -->
                    <control type="radiobutton" id="621">
                        <description>Game Poster & Fanarts</description>
                        <include>SettingsLabel</include>
                        <label>$LOCALIZE[31441] Game Poster & Fanarts</label>
                        <onclick>Skin.ToggleSetting(NoViewGamePosterFanarts)</onclick>
                        <selected>Skin.HasSetting(NoViewGamePosterFanarts)</selected>
                    </control>
                </control>
                <!-- Home Artwork -->
                ...

So I was able to see the view into Program Addons... but I only have the top of the view... not the bottom.

Image

I understand that it is realted to conditionnal state to display or not the bottom information, but I was not able to found were to active these bottom information.
Reply
#9
Here is a new version of my Viewtype_Games_PosterAndFanart.xml file : http://pastebin.com/AqKUdCq5

Image

Now the view :
  • display the release year,
  • display the game platform name
  • and display the game overlay (finished/unfinished)
It have also cleaned all uncessessary information related to movies/tvshows. But I still not able to display the bottom part (description/plot). It seems that this part is located into another xml file. It still investigating.
Reply
#10
Oh... ok... I have found how to do it. Just to modify the Includes.xml file like this :

Code:
    ...
    <!-- Addon Description -->
    <include name="Global_AddonInfo">
        <control type="group">
            <visible>Container.Content(Addons) | SubString(Container.FolderPath,plugin)</visible>
            <include>PlotBox</include>
        </control>
    </include>
    ...

And the game plot is now displayed :

Image

Just need now to found how to display the studio logo and the view for tall covers will be complete.
Reply
#11
Finally I've done it...

Here is the new Viewtype_Games_PosterAndFanart file : http://pastebin.com/siaUFW4J and here is the Includes_MediaFlags.xml modified file : http://pastebin.com/dAQDXRYR

Image

I have modifed the Includes_MediaFlags.xml file to display game specific tags (only for the plugin views):
  • game studio logo replace movie/TV Show logo. To not mix everything, game studio logo will be located into /extras/games/studios
  • game platform logo replace MPAA flags. Here again, to not mix everything, game Platform logo will be located into /extras/games/platforms
  • and game genre logo replace star rating. And to not mix everything, game genre logo will be located into /extras/games/genres
Here are all modified files form version 1.9.2.1347669227 of Metropolis : http://code.google.com/p/xbmc-advanced-l...is.svn.zip

I think the biggest part is done. Now I need to create 2 similar view for square covers (GBA, PSX, etc...) and for wide covers (Super Nintendo, Nintendo 64, etc...).
Reply
#12
Square view done!

Image

Next... wide view.
Reply
#13
Finally the last one, for wide covers :

Image

Here are all the necessary modified and created files : http://code.google.com/p/xbmc-advanced-l...svn.v2.zip
Reply
#14
New version : http://code.google.com/p/xbmc-advanced-l...svn.v3.zip fixing finished/unfinised overlay position error.
That's all !!! Wink
Reply
#15
I'll work on integrating these views into the stock Metropolis this week. Thanks for the contributions!
Reply

Logout Mark Read Team Forum Stats Members Help
[WIP][MOD] Advanced Launcher support0