[WIP][MOD] Advanced Launcher support

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #1
Part 1 : Add an Games/Advanced Launcher entry into default home page

[Image: screenshot000.jpg]

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: screenshot001.jpg]

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.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-07-19 04:03 by Angelscry.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #2
Part 3 : Add Settings to Show/Hide Games/Advanced Launcher entries into home pages

[Image: screenshot002.jpg]

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>

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #3
Part 4 : Add Artwork selection for Games/Advanced Launcher home page entry

[Image: screenshot003.jpg]

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...

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-07-04 04:21 by Angelscry.)
find quote
dekani Offline
Junior Member
Posts: 28
Joined: Aug 2010
Reputation: 1
Location: France
Post: #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)
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #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
(This post was last modified: 2012-09-15 02:26 by jingai.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #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.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #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.
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #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: screenshot001.jpg]

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.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

(This post was last modified: 2012-09-15 19:24 by Angelscry.)
find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #9
Here is a new version of my Viewtype_Games_PosterAndFanart.xml file : http://pastebin.com/AqKUdCq5

[Image: screenshot003.jpg]

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.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
Angelscry Offline
Skilled Python Coder
Posts: 2,757
Joined: Sep 2010
Reputation: 38
Location: MTL, Canada
Post: #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: screenshot004.jpg]

Just need now to found how to display the studio logo and the view for tall covers will be complete.

Advanced Launcher | Manual | WiKi | Forums | Tutorials | Gallery | GitHub | Archives | Donate

find quote
Post Reply