Kodi Community Forum

Full Version: How hidden Submenu HUB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone. I will try to explain for you to understand (it is not easy sorry)

In the menu principale ( Homemenu )(here is the code), Submenu are visible with a click / skinshortcut is "allmenus " And I would like it to remain that way. But I do not want to see the shortcut Submenu MOVIES HUB (here) .This is useless. And I fail to understand how to hide the submenu HUB on the main menu.


http://i.imgur.com/4dYirSS.jpg



Code:
<!--MAIN MENU-->
        <control type="group" id="9109">
            <width>340</width>
            <animation type="Conditional" condition="Control.HasFocus(9210)">
                <effect type="Slide" time="300" center="auto" start="0" end="-340" easing="In" tween="Quadratic"/>
            </animation>
            <control type="image">
                <width>340</width>
                <height>screen_Height</height>
                 <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                    <animation effect="fade" start="100" end="60" condition="Skin.HasSetting(opacitymenu.disable)">Conditional</animation>                
                <animation effect="fade" start="100" end="90" time="0" condition="!Skin.HasSetting(widgets.disable)">Conditional</animation>
                <animation effect="fade" start="100" end="90" time="0" condition="!Skin.HasSetting(widgets.disable)">Conditional</animation>
                <animation type="Conditional" condition="Control.HasFocus(9110)" reversible="false">
                    </animation>
            <animation type="Conditional" condition="!Control.HasFocus(9110)" reversible="false">
                </animation>            
                <visible>!Skin.HasSetting(homemenu.compact)</visible>
            </control>
            <control type="image">
                <width>340</width>
                <height>10</height>
                <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                <colordiffuse>base_33</colordiffuse>                
                <visible>Skin.HasSetting(homemenu.compact)</visible>
            </control>
            <control type="list" id="9110">
                <left>0</left>
                <top>10</top>
                <width>340</width>
                <height min="50" max="screen_Height">auto</height>
                <onback>9110</onback>
                <onup>9110</onup>
                <ondown>9110</ondown>
                <onright condition="Skin.HasSetting(widgets.disable) + !IsEmpty(Container(9110).ListItem.Property(Widget))">9210</onright>
                <onleft>RunScript(script.skinshortcuts,type=hidesubmenu&amp;mainmenuID=9110)</onleft>
                <onback>RunScript(script.skinshortcuts,type=hidesubmenu&amp;mainmenuID=9110)</onback>
                <itemgap>0</itemgap>
                <pagecontrol>80</pagecontrol>
                <include>global_ListScroll</include>
                <orientation>vertical</orientation>
                <itemlayout width="340" height="50">
                    <control type="image">
                        <width>340</width>
                        <height>50</height>
                        <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                        <animation effect="fade" start="100" end="90" time="0" condition="!Skin.HasSetting(widgets.disable)">Conditional</animation>
                <animation type="Conditional" condition="Control.HasFocus(9110)" reversible="false">
                    </animation>
            <animation type="Conditional" condition="!Control.HasFocus(9110)" reversible="false">
                </animation>
            <animation effect="fade" start="100" end="80" time="0" condition="Skin.HasSetting(opacitymenu.disable) + Skin.HasSetting(homemenu.compact)">Conditional</animation>
                        <visible>Skin.HasSetting(homemenu.compact)</visible>
                    </control>
                    <control type="group">
                        <left>10</left>                        
                        <control type="image">
                            <width>320</width>
                            <height>49</height>
                            <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                            <animation effect="fade" start="100" end="20" time="0" condition="Skin.HasSetting(opacitymenu.disable) + Skin.HasSetting(homemenu.compact)">Conditional</animation>
                            <animation effect="fade" start="100" end="20" time="0" condition="Skin.HasSetting(opacitymenu.disable) + !Skin.HasSetting(homemenu.compact)">Conditional</animation>
                            <visible>!IsEmpty(ListItem.Property(isSubmenu))</visible>
                        </control>
                    </control>
                    <control type="group">
                        <left>25</left>
                        <control type="label">
                            <width>280</width>
                            <height>46</height>
                            <font>condensed_Home</font>
                            <textcolor>Color3</textcolor>
                            <label>$INFO[ListItem.Label]</label>
                            </control>                        
                        <control type="label">
                            <right>5</right>
                            <width>20</width>
                            <height>43</height>
                            <label>›</label>
                            <font>regular</font>
                            <align>right</align>
                            <visible>!IsEmpty(ListItem.Property(hasSubmenu))</visible>
                            <visible>!StringCompare(ListItem.Property("submenuVisibility"),Window(10000).Property("submenuVisibility") )</visible>
                        <textcolor>Color3</textcolor>
                        </control>
                    </control>
                </itemlayout>
                <focusedlayout width="340" height="50">
                    <control type="image">
                        <width>340</width>
                        <height>60</height>
                        <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                        <visible>Skin.HasSetting(homemenu.compact) + IsEmpty(Container(9110).ListItemNoWrap(1).Label) + Container(9110).HasFocus() + ![Window.IsActive(keyboard) | Window.IsActive(script-skinshortcuts.xml)]</visible>
                    </control>
                    <control type="image">
                        <width>340</width>
                        <height>50</height>
                        <texture border="5" colordiffuse="$VAR[ColorHome]">white.png</texture>
                        <visible>Skin.HasSetting(homemenu.compact)</visible>
                    </control>
                    <control type="image">
                        <left>10</left>
                        <top>0</top>
                        <width>320</width>
                        <height>49</height>
                        <texture colordiffuse="ffffffff">home/menuitemfo.png</texture>
                        <bordertexture colordiffuse="ffffffff"></bordertexture>
                    </control>
                    <control type="group">
                        <left>25</left>
                        <control type="label">
                            <height>46</height>
                            <width>280</width>
                            <font>condensed_Home</font>                        
                            <label>$INFO[ListItem.Label]</label>
                            <textcolor>Color3</textcolor>
                            </control>    
                        
                    
                    
                        <control type="label">
                            <right>5</right>
                            <width>20</width>
                            <height>43</height>
                            <label>›</label>
                            <font>regular</font>
                            <align>right</align>
                            <textcolor>Color2</textcolor>
                            <visible>!IsEmpty(ListItem.Property(hasSubmenu))</visible>
                            <visible>!StringCompare(ListItem.Property("submenuVisibility"),Window(10000).Property("submenuVisibility") )</visible>
                        </control>
                    </control>
                </focusedlayout>
                <content>
                     <include>skinshortcuts-allmenus</include>
                </content>
            </control>            
        </control>
If you don't want it then remove using skin shortcuts.
So with a "Allmenus" (skinshortcut-allmenus) we can not hide one submenu in particular? obliged to have all the submenu displayed?
To succeed I have create 2 grouplist with different id. With one grouplist, everything is displayed.
Not sure I'm following you correctly but with skin shortcuts you can change everything to your liking - if you don't want a sub menu for an item simply remove all the items in the sub menu, etc. It's all done to the user and not really anything to do with skinning it.