Kodi Community Forum

Full Version: Add Addon shortcut to Games menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all !

I'm trying to add a shortcut to the IAGL addon under the Games menu, without success ...

For the moment, I managed to add an "Extensions" submenu by modifying the Home.xml file and adding the code:

                <control type="grouplist" id="9018">
                    <include>HomeSubMenuCommonValues</include>
                    <onleft>9018</onleft>
                    <onright>9018</onright>
                    <visible>Container(9000).HasFocus(14)</visible>
                    <!--Buttons for the grouplist -->
                    <include>HomeSubMenuGames</include>
                </control>
Then modifying the IncludesHomeMenuItems.xml file by adding the code:

    <include name="HomeSubMenuGames">
        <control type="image" id="90147">
            <width>35</width>
            <height>35</height>
            <texture border="0,0,0,3" flipx="true">HomeSubEnd.png</texture>
        </control>
        <control type="button" id="90148">
            <include>ButtonHomeSubCommonValues</include>
            <label>24001</label>
            <onclick>ActivateWindow(Games,Addons,return)</onclick>
        </control>
        <control type="image" id="90149">
            <width>35</width>
            <height>35</height>
            <texture border="0,0,0,3">HomeSubEnd.png</texture>
        </control>
    </include>
This gives access via this sub-menu to the IAGL extension. But in the Confluence skin configuration menu, I can not add IAGL to shortcuts, just shortcuts to emulators ... Why?
Image

I've also tried modifying the Confluence settings.xml file in Userdata here:
<setting id = "HomeGameButton1" type = "string"> plugin.program.iagl </ setting>
But the modifications that I make there are not preserved at the restart of Kodi ...

Is there a solution ?

Thanks !
Hello,

I found a solution, may not be perfect, but that works; in the SkinSettings.xml file of the Confluence skin, I replaced:

                        <control type="button" id="451">
                            <width>750</width>
                            <height>40</height>
                            <font>font13</font>
                            <label>$LOCALIZE[24000] 1</label>
                            <label2>$INFO[system.addontitle(Skin.String(HomeGameButton1))]</label2>
                            <textcolor>grey2</textcolor>
                            <focusedcolor>white</focusedcolor>
                            <texturefocus>MenuItemFO.png</texturefocus>
                            <texturenofocus>MenuItemNF.png</texturenofocus>
                            <onclick>Skin.SetAddon(HomeGameButton1,kodi.gameclient)</onclick>
                         </control>
by :

                        <control type="button" id="451">
                            <width>750</width>
                            <height>40</height>
                            <font>font13</font>
                            <label>$LOCALIZE[24000] 1</label>
                            <label2>$INFO[system.addontitle(Skin.String(HomeGameButton1))]</label2>
                            <textcolor>grey2</textcolor>
                            <focusedcolor>white</focusedcolor>
                            <texturefocus>MenuItemFO.png</texturefocus>
                            <texturenofocus>MenuItemNF.png</texturenofocus>
                            <!--<onclick>Skin.SetAddon(HomeGameButton1,kodi.gameclient)</onclick>-->
                            <onclick>Skin.SetAddon(HomeGameButton1,xbmc.python.pluginsource)</onclick>
                        </control>


"xbmc.python.pluginsource" being the extension point of the IAGL addon ...

If it is possible to add other parameters to the "OnClick" function associated with the "HomeGameButton1" selection button, I take the info!