Kodi Community Forum

Full Version: Custom menu that blocked;)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I need your help.
I created a new menu, but it do not want to work. This is a custom menu with selection addon or folder or playlist !
thx Smile
Cheers



HOMEMENU.XML

PHP Code:
<!--My Menu-->
                    <
control type="button" id="908">
                        <
label>$INFO[Skin.String(CustomNew.label]</label>
                        <
label2>$VAR[home_SubIndicatorCustomNew]</label2>
                        <!--
submenu items disabled-->
                        <
onclick condition="IsEmpty(Skin.String(customitem.customnew1.label)">ActivateWindow(Videos,return)</onclick>
                        <!--
submenu items enabled-->
                        <
onclick condition="!IsEmpty(Skin.String(customitem.customnew1.label)">SetFocus(1111)</onclick>
                        <include>
home_MenuButton</include>
                        <
visible>Skin.HasSetting(homemenu.customnew.enable)</visible>
                    </
control


VARIABLE.XML

PHP Code:
<variable name="home_CustomSelectionCustomNew">
        <
value condition="!IsEmpty(Skin.String(customitem.customnew1.label)) + StringCompare(Window(Home).Property(customitem.customnew.number),1)">$INFO[Skin.String(customitem.customnew1.label)] $INFO[Skin.String(customitem.customnew1.type),(,)]</value>        
        <
value>$LOCALIZE[231]</value>
    </
variable

----------------------------

<variable name="home_SubIndicatorCustomNew">
<value condition="!IsEmpty(Skin.String(customitem.customnew1.label))">›</value>
</variable>
CUSTOM_HOMEMENUSETTING.XML

PHP Code:
<!--customNew submenu-->
                <
control type="grouplist" id="500">
                    <
left>250</left>
                        <
width>484</width>
                        <
height>520</height>
                        <
onleft>10</onleft>
                        <
onright>70</onright>
                        <
onup>500</onup>
                        <
ondown>600</ondown>
                        <
itemgap>0</itemgap>
                        <
pagecontrol>70</pagecontrol>
                        <include>
global_ListScroll</include>
                        <
visible>Skin.String(Section,CustomNew)</visible>
                    <!--
label-->
                    <
control type="radiobutton" id="501">
                        <
label>Label$INFO[Skin.String(CustomNew.label)]</label>
                        <
width>484</width>
                        <
onclick>Skin.Reset(CustomNew.label)</onclick>
                        <
onclick>Skin.SetString(CustomNew.label)</onclick>
                        <
selected>!IsEmpty(Skin.String(CustomNew.label))</selected>
                        <include>
dialog_Radio-alt</include>
                    </
control>
                    <!--
custom New Menu items-->
                        <
control type="button" id="513">
                            <
width>484</width>
                            <
label>Custom Item 1</label>
                            <
label2>$INFO[Skin.String(customitem.customnew1.label)]</label2>
                            <!--(
re)set category-->
                            <
onclick>ClearProperty(customitem.category,Home)</onclick>
                            <
onclick>SetProperty(customitem.category,customnew,Home)</onclick>
                            <!--
reset previous item values-->
                            <
onclick>Skin.Reset(customitem.customnew1.path)</onclick>
                            <
onclick>Skin.Reset(customnewmenu.type1)</onclick>
                            <!--
set up new item value-->
                            <
onclick>SetProperty(customitem.customnew.number,1,Home)</onclick>
                            <
onclick>ActivateWindow(96)</onclick>
                            <include>
dialog_Radio-alt</include>
                        </
control
hi

ok I realized I forgot to return the current line of windows.

By cons why when I activate a custom New (eg, My Menu MENU + a playlist KIDS) tab works well, but I am positioned on the File tab of the VIDEO menu?

Cheers Smile
Someone can help me? why is the video tab that opens my Custom Menu tab on the Home?

I think it is a problem LOCALIZE, I have not found me. I created a Custome With possibility to be renamed, and I do not know how Summing Localize on the Item entered customnew1
I do this now, but it does not work! Thanks for your help Smile

PHP Code:
<!--My Menu-->
                    <
control type="button" id="908">
                        <
label>$INFO[Skin.String(Customnew.label]</label>
                        <
label2>$VAR[home_SubIndicatorCustomNew]</label2>
                        <!--
submenu items disabled-->
                        <
onclick condition="IsEmpty(Skin.String(customitem.customnew1.label))">ActivateWindow(Videos,customnew,return)</onclick>
                        <!--
submenu items enabled-->
                        <
onclick condition="!IsEmpty(Skin.String(customitem.customnew1.label))">SetFocus(99999)</onclick>
                        <include>
home_MenuButton</include>
                        <
visible>Skin.HasSetting(homemenu.customnew.enable)</visible>
                    </
control>
                    <!--
videos files-->
                    <
control type="button" id="909">
                        <
label>$LOCALIZE[744]</label>
                        <
onclick>ActivateWindow($VAR[customnew_click])</onclick>
                        <
onleft>100</onleft>
                        <
onback>100</onback>
                        <include>
home_SubMenuButton</include>
                        <
visible>!Skin.HasSetting(homemenu.customnew.disable) + ![IsEmpty(Skin.String(customitem.customnew1.label)) + [Control.HasFocus(99999) | Control.HasFocus(909) | Skin.String(HomeSub,$LOCALIZE[Skin.String(Customnew.Label))]</visible>
                    </
control>
                    <!--
custom New Menu 1-->        
                    <
control type="button" id="910">
                        <
label>$INFO[Skin.String(customitem.customnew1.label)]</label>
                        <
onleft>100</onleft>
                        <
onback>100</onback>
                        <
onclick condition="Skin.String(customitem.customnew1.type,$LOCALIZE[20334])">ActivateWindow(Videos,$INFO[Skin.String(customitem.customnew1.path)],return)</onclick>
                        <
onclick condition="Skin.String(customitem.customnew1.type,$LOCALIZE[559])">ActivateWindow(VideoLibrary,$INFO[Skin.String(customitem.customnew1.playlistpath)],return)</onclick>
                        <
onclick condition="Skin.String(customitem.customnew1.type,$LOCALIZE[24000])">RunAddon($INFO[Skin.String(customitem.customnew1.addonpath)])</onclick>
                        <include>
home_SubMenuButton</include>
                        <
visible>!IsEmpty(Skin.String(customitem.customnew1.label)) + [Control.HasFocus(99999) | Control.HasFocus(910) | Skin.String(HomeSub,$LOCALIZE[Skin.String(Customnew.Label))]</visible>
                    </
control
I would like to create this:

My Menu
-------------- Addon
--------------- Dossier
--------------- Playlist


The menu " My Menu " is independent of the menu movie and videos, if it is enabled and I added a custom item my menu appears, if I have not added custom item does , My Menu not appear.
What I do not understand it is the LOCALIZE, Is that I can create a LOCALIZE for an article that you just rename? Can I create a menu to open a choice of item only ?
Ok I understand, I have to create a new file, homesubmenu. Xml.

Thank you for your helpWink

Cheers