Creating dropdown menu with auto collapse
#16
(2013-05-05, 14:15)denywinarto Wrote:
(2013-05-03, 14:03)MassIV Wrote:
Code:
<onclick condition="IsEmpty(skin.string(SubMenu1))">Skin.Setstring(SubMenu1,open)</onclick>
<onclick condition="!IsEmpty(skin.string(SubMenu1))">Skin.Setstring(SubMenu1,)</onclick>

Thanks MassIV ! Big Grin
It's almost done
Now i'm gonna try changing the font

MassIV, i got another question,
how come visiblechange animation doesn't work?

<animation effect="fade" time="1800">VisibleChange</animation>

I put that below <visible></visible> but i didn't see any difference
Reply
#17
Is that the actual code you are using? If so you are missing start and end.

<animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>

And you need a condition between the <visible> and the </visible> tag.

If not plz show what you are actually using.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#18
(2013-05-13, 11:29)MassIV Wrote: Is that the actual code you are using? If so you are missing start and end.

<animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>

And you need a condition between the <visible> and the </visible> tag.

If not plz show what you are actually using.

What are the conditions MassIV?

PHP Code:
    <item id="21"><!-- Fav 1 -->
    <
label fallback="31071">$INFO[skin.string(fav1.label)]</label>
    <
label2>31106</label2>
    <
icon fallback="special://skin/backgrounds/favourites.jpg">$VAR[value_mainmenubg_fav1]</icon>
    <
onclick>$INFO[skin.string(fav1.path)]</onclick>
    <
property name="dropdown">not_empty</property>
    <
visible>!IsEmpty(skin.string(fav1))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>    
    </
item>
    <
item id="22"><!-- Fav 2 -->
    <
label fallback="31071">$INFO[skin.string(fav2.label)]</label>
    <
label2>31106</label2>
    <
icon fallback="special://skin/backgrounds/favourites.jpg">$VAR[value_mainmenubg_fav2]</icon>
    <
onclick>$INFO[skin.string(fav2.path)]</onclick>
    <
property name="dropdown">not_empty</property>    
    <
visible>!IsEmpty(skin.string(fav2))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>        
    </
item>
    <
item id="23"><!-- Fav 3 -->
    <
label fallback="31071">$INFO[skin.string(fav3.label)]</label>
    <
label2>31106</label2>
    <
icon fallback="special://skin/backgrounds/favourites.jpg">$VAR[value_mainmenubg_fav3]</icon>
    <
onclick>$INFO[skin.string(fav3.path)]</onclick>
    <
property name="dropdown">not_empty</property>
    <
visible>!IsEmpty(skin.string(fav3))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>        
    </
item>
    <
item id="24"><!-- Fav 4 -->
    <
label fallback="31071">$INFO[skin.string(fav4.label)]</label>
    <
label2>31106</label2>
    <
icon fallback="special://skin/backgrounds/favourites.jpg">$VAR[value_mainmenubg_fav4]</icon>
    <
onclick>$INFO[skin.string(fav4.path)]</onclick>
    <
property name="dropdown">not_empty</property>
    <
visible>!IsEmpty(skin.string(fav4))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>    
    </
item>
    <
item id="25"><!-- Fav 5 -->
    <
label fallback="31071">$INFO[skin.string(fav5.label)]</label>
    <
label2>31106</label2>
    <
icon fallback="special://skin/backgrounds/favourites.jpg">$VAR[value_mainmenubg_fav5]</icon>
    <
onclick>$INFO[skin.string(fav5.path)]</onclick>
    <
property name="dropdown">not_empty</property>
    <
visible>!IsEmpty(skin.string(fav5))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>    
    </
item
Reply
#19
You've got the animation code in the wrong place, it should go in the actual control you want to animate.
Reply
#20
(2013-05-13, 17:37)Hitcher Wrote: You've got the animation code in the wrong place, it should go in the actual control you want to animate.

PHP Code:
    <itemlayout width="300" height="40">
    <
control type="image">
    <
posx>0</posx>
    <
posy>0</posy>
    <
width>298</width>
    <
height>3</height>
    <
texture flipx="true">divider.png</texture>
    <
colordiffuse>90FFFFFF</colordiffuse>
    </
control>
    <
control type="label">
    <
posx>20</posx>
    <
posy>1</posy>
    <
width>260</width>
    <
height>40</height>
    <
font>Font_26</font>
    <
label>$INFO[ListItem.Label]</label>
    <
align>left</align>
    <
aligny>center</aligny>
    <
textcolor>E4101010</textcolor>
    <
visible>!IsEmpty(ListItem.Property(normal))</visible>    
    </
control>
    <
control type="label">
    <
posx>20</posx>
    <
posy>1</posy>
    <
width>260</width>
    <
height>40</height>
    <
font>Font_19</font>
    <
label>$INFO[ListItem.Label]</label>
    <
align>left</align>
    <
aligny>center</aligny>
    <
textcolor>E4101010</textcolor>
    <
visible>!IsEmpty(ListItem.Property(dropdown))</visible>
    <
animation effect="fade" start="30" end="70" time="1800">VisibleChange</animation>        
    </
control>    
    </
itemlayout

Here?
Still won't work though
Reply
#21
Tricky one. Hope i can explain it correctly.

Visible or VisibleChange do not mean "activate if it becomes visible". It means "activate when the condition in the visible tags is met".
That might look like semantics, but it's not.

Because in this case you are telling it to activate when the dropdown property is full. And that property never changes, it's always full. So there is no state change. Nothing to trigger an animation. Except maybe the first time the condition is read.

So while this method works good enough for controlling the visible state of a label. It is not good enough for triggering an animation.
And you should probably be using the state change of the skin string (that opens the sub menu) as condition for the animation (did not test).
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#22
(2013-05-14, 13:45)MassIV Wrote: Tricky one. Hope i can explain it correctly.

Visible or VisibleChange do not mean "activate if it becomes visible". It means "activate when the condition in the visible tags is met".
That might look like semantics, but it's not.

Because in this case you are telling it to activate when the dropdown property is full. And that property never changes, it's always full. So there is no state change. Nothing to trigger an animation. Except maybe the first time the condition is read.

So while this method works good enough for controlling the visible state of a label. It is not good enough for triggering an animation.
And you should probably be using the state change of the skin string (that opens the sub menu) as condition for the animation (did not test).

This is my best guess, still won't work though
PHP Code:
    <itemlayout width="300" height="40">
    <
control type="image">
    <
posx>0</posx>
    <
posy>0</posy>
    <
width>298</width>
    <
height>3</height>
    <
texture flipx="true">divider.png</texture>
    <
colordiffuse>90FFFFFF</colordiffuse>
    </
control>
    <
control type="label">
    <
posx>20</posx>
    <
posy>1</posy>
    <
width>260</width>
    <
height>40</height>
    <
font>Font_26</font>
    <
label>$INFO[ListItem.Label]</label>
    <
align>left</align>
    <
aligny>center</aligny>
    <
textcolor>E4101010</textcolor>
    <
visible>!IsEmpty(ListItem.Property(normal))</visible>    
    </
control>
    <
control type="label">
    <
posx>20</posx>
    <
posy>1</posy>
    <
width>260</width>
    <
height>40</height>
    <
font>Font_19</font>
    <
label>$INFO[ListItem.Label]</label>
    <
align>left</align>
    <
aligny>center</aligny>
    <
textcolor>E4101010</textcolor>
    <
visible>!IsEmpty(ListItem.Property(dropdown))</visible>
    <
animation effect="fade" start="30" end="70" time="1800" condition="Control.Property(dropdown)">Conditional</animation>        
    </
control

Also, that dropdown property applies to 5 submenus, would that be a problem?
Reply
#23
http://wiki.xbmc.org/?title=List_of_Boolean_Conditions

I can't find "HasProperty" condition there..
Does it mean it's not supported ?
So what should i use for my case?

Control.HasProperty doesn't seem to be working..
Reply
#24
It's an info label not a condition -

Code:
Window([window]).Property(key)     Window property. (key can be any value, optional window can be id or name)
Reply
#25
Ok...almost finished this one,
(Still couldn't figure out the animation thing)

there's another thing i can't figure out,
How do i make the menu stay closed when xbmc starts?

This is what i mean :



right now it looks like this, i use 9 menus, each has 5 dropdown menu
this is the first menu :
PHP Code:
    <item id="31"><!-- Vpl 1 -->
    <
label fallback="31072">$INFO[skin.string(vpl1.label)]</label>
    <
label2 fallback="31107">$VAR[value_libraryvpl1]</label2>
    <
icon fallback="special://skin/backgrounds/vplaylist.jpg">$VAR[value_mainmenubg_vpl1]</icon>
    <
onclick condition="IsEmpty(skin.string(fav1))">Skin.Setstring(fav1,open)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav1))">Skin.Setstring(fav1,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav6))">Skin.Setstring(fav6,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav11))">Skin.Setstring(fav11,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav16))">Skin.Setstring(fav16,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav21))">Skin.Setstring(fav21,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav26))">Skin.Setstring(fav26,)</onclick>        
    <
onclick condition="!IsEmpty(skin.string(fav31))">Skin.Setstring(fav31,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav36))">Skin.Setstring(fav36,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav41))">Skin.Setstring(fav41,)</onclick>        
    <
onclick condition="IsEmpty(skin.string(fav2))">Skin.Setstring(fav2,open)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav2))">Skin.Setstring(fav2,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav7))">Skin.Setstring(fav7,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav12))">Skin.Setstring(fav12,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav17))">Skin.Setstring(fav17,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav22))">Skin.Setstring(fav22,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav27))">Skin.Setstring(fav27,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav32))">Skin.Setstring(fav32,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav37))">Skin.Setstring(fav37,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav42))">Skin.Setstring(fav42,)</onclick>        
    <
onclick condition="IsEmpty(skin.string(fav3))">Skin.Setstring(fav3,open)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav3))">Skin.Setstring(fav3,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav8))">Skin.Setstring(fav8,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav13))">Skin.Setstring(fav13,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav18))">Skin.Setstring(fav18,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav23))">Skin.Setstring(fav23,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav28))">Skin.Setstring(fav28,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav33))">Skin.Setstring(fav33,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav38))">Skin.Setstring(fav38,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav43))">Skin.Setstring(fav43,)</onclick>        
    <
onclick condition="IsEmpty(skin.string(fav4))">Skin.Setstring(fav4,open)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav4))">Skin.Setstring(fav4,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav9))">Skin.Setstring(fav9,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav14))">Skin.Setstring(fav14,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav19))">Skin.Setstring(fav19,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav24))">Skin.Setstring(fav24,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav29))">Skin.Setstring(fav29,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav34))">Skin.Setstring(fav34,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav39))">Skin.Setstring(fav39,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav44))">Skin.Setstring(fav44,)</onclick>    
    <
onclick condition="IsEmpty(skin.string(fav5))">Skin.Setstring(fav5,open)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav5))">Skin.Setstring(fav5,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav10))">Skin.Setstring(fav10,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav15))">Skin.Setstring(fav15,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav20))">Skin.Setstring(fav20,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav25))">Skin.Setstring(fav25,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav30))">Skin.Setstring(fav30,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav35))">Skin.Setstring(fav35,)</onclick>
    <
onclick condition="!IsEmpty(skin.string(fav40))">Skin.Setstring(fav40,)</onclick>    
    <
onclick condition="!IsEmpty(skin.string(fav45))">Skin.Setstring(fav45,)</onclick>
    <
visible>!IsEmpty(skin.string(vpl1.path))</visible>    
    <
property name="normal">not_empty</property>    
    </
item

My question is, how do we set the property of each fav (submenu) to "closed" on xbmc startup?
I tried including this on includes.xml but it doesn't work

PHP Code:
    <onload>Skin.Setstring(fav1,)</onload>
    <
onload>Skin.Setstring(fav2,)</onload>
    <
onload>Skin.Setstring(fav3,)</onload>
    <
onload>Skin.Setstring(fav4,)</onload>
    <
onload>Skin.Setstring(fav5,)</onload>
    <
onload>Skin.Setstring(fav6,)</onload>
    <
onload>Skin.Setstring(fav7,)</onload>
    <
onload>Skin.Setstring(fav8,)</onload>
    <
onload>Skin.Setstring(fav9,)</onload>
    <
onload>Skin.Setstring(fav10,)</onload>
    <
onload>Skin.Setstring(fav11,)</onload>
    <
onload>Skin.Setstring(fav12,)</onload>
    <
onload>Skin.Setstring(fav13,)</onload>
    <
onload>Skin.Setstring(fav14,)</onload>
    <
onload>Skin.Setstring(fav15,)</onload>
    <
onload>Skin.Setstring(fav16,)</onload>
    <
onload>Skin.Setstring(fav17,)</onload>
    <
onload>Skin.Setstring(fav18,)</onload>
    <
onload>Skin.Setstring(fav19,)</onload>
    <
onload>Skin.Setstring(fav20,)</onload>
    <
onload>Skin.Setstring(fav21,)</onload>
    <
onload>Skin.Setstring(fav22,)</onload>
    <
onload>Skin.Setstring(fav23,)</onload>
    <
onload>Skin.Setstring(fav24,)</onload>
    <
onload>Skin.Setstring(fav25,)</onload>
    <
onload>Skin.Setstring(fav26,)</onload>
    <
onload>Skin.Setstring(fav27,)</onload>
    <
onload>Skin.Setstring(fav28,)</onload>
    <
onload>Skin.Setstring(fav29,)</onload>
    <
onload>Skin.Setstring(fav30,)</onload>
    <
onload>Skin.Setstring(fav31,)</onload>
    <
onload>Skin.Setstring(fav32,)</onload>
    <
onload>Skin.Setstring(fav33,)</onload>
    <
onload>Skin.Setstring(fav34,)</onload>
    <
onload>Skin.Setstring(fav35,)</onload>
    <
onload>Skin.Setstring(fav36,)</onload>
    <
onload>Skin.Setstring(fav37,)</onload>
    <
onload>Skin.Setstring(fav38,)</onload>
    <
onload>Skin.Setstring(fav39,)</onload>
    <
onload>Skin.Setstring(fav40,)</onload>
    <
onload>Skin.Setstring(fav41,)</onload>
    <
onload>Skin.Setstring(fav42,)</onload>
    <
onload>Skin.Setstring(fav43,)</onload>
    <
onload>Skin.Setstring(fav44,)</onload>
    <
onload>Skin.Setstring(fav45,)</onload

Because if i open a dropdown menu then close xbmc,
on startup that menu will remain open,,,

I looked up in guisettings.xml, and the opened submenu has "open" setting


PHP Code:
<setting type="string" name="skin.ace.fav1">open</setting>
        <
setting type="string" name="skin.ace.fav2">open</setting>
        <
setting type="string" name="skin.ace.fav3">open</setting>
        <
setting type="string" name="skin.ace.fav4">open</setting>
        <
setting type="string" name="skin.ace.fav5">open</setting>
        <
setting type="string" name="skin.ace.fav6"></setting>
        <
setting type="string" name="skin.ace.fav7"></setting>
        <
setting type="string" name="skin.ace.fav8"></setting>
        <
setting type="string" name="skin.ace.fav9"></setting>
        <
setting type="string" name="skin.ace.fav10"></setting>
        <
setting type="string" name="skin.ace.fav11"></setting>
        <
setting type="string" name="skin.ace.fav12"></setting>
        <
setting type="string" name="skin.ace.fav13"></setting>
        <
setting type="string" name="skin.ace.fav14"></setting>
        <
setting type="string" name="skin.ace.fav15"></setting>
        <
setting type="string" name="skin.ace.fav16"></setting>
        <
setting type="string" name="skin.ace.fav17"></setting>
        <
setting type="string" name="skin.ace.fav18"></setting>
        <
setting type="string" name="skin.ace.fav19"></setting>
        <
setting type="string" name="skin.ace.fav20"></setting>
        <
setting type="string" name="skin.ace.fav21"></setting>
        <
setting type="string" name="skin.ace.fav22"></setting>
        <
setting type="string" name="skin.ace.fav23"></setting>
        <
setting type="string" name="skin.ace.fav24"></setting>
        <
setting type="string" name="skin.ace.fav25"></setting>
        <
setting type="string" name="skin.ace.fav26"></setting>
        <
setting type="string" name="skin.ace.fav27"></setting>
        <
setting type="string" name="skin.ace.fav28"></setting>
        <
setting type="string" name="skin.ace.fav29"></setting>
        <
setting type="string" name="skin.ace.fav30"></setting>
        <
setting type="string" name="skin.ace.fav31"></setting>
        <
setting type="string" name="skin.ace.fav32"></setting>
        <
setting type="string" name="skin.ace.fav33"></setting>
        <
setting type="string" name="skin.ace.fav34"></setting>
        <
setting type="string" name="skin.ace.fav35"></setting>
        <
setting type="string" name="skin.ace.fav36"></setting>
        <
setting type="string" name="skin.ace.fav37"></setting>
        <
setting type="string" name="skin.ace.fav38"></setting>
        <
setting type="string" name="skin.ace.fav39"></setting>
        <
setting type="string" name="skin.ace.fav40"></setting>
        <
setting type="string" name="skin.ace.fav41"></setting>
        <
setting type="string" name="skin.ace.fav42"></setting>
        <
setting type="string" name="skin.ace.fav43"></setting>
        <
setting type="string" name="skin.ace.fav44"></setting>
        <
setting type="string" name="skin.ace.fav45"></setting

judging from that,
how come this doesn;t work??
<onload>Skin.Setstring(fav##,)</onload>

Tried this and it didn't work either:
<onload>Skin.Setstring(fav##)</onload>
Reply
#26
You are making this far too difficult. But i'm a little pressed for time atm.

So have a look at this, grab the repo and install the skin (version 0.1.1).
It has the animation and the closing.
https://code.google.com/p/skin-git/downloads/list

The menu is in: Includes_MainMenu.xml
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#27
(2013-06-06, 16:56)MassIV Wrote: You are making this far too difficult. But i'm a little pressed for time atm.

So have a look at this, grab the repo and install the skin (version 0.1.1).
It has the animation and the closing.
https://code.google.com/p/skin-git/downloads/list

The menu is in: Includes_MainMenu.xml

Thanks i'll have a look.
Well, for my last question,
it's because the menu must be closed on startup or else it'll screw up the order of a script in the submenu.
(I put random items on submenu focus)


Awesome skin MassIV, you plan on releasing this soon?


btw, i couldn't figure out how you make the dropdown menu always closes on startup
PHP Code:
                        <item id="101">
                            <
label>Movie Library</label>
                            <
icon>-</icon>                          
                            <
visible>Library.HasContent(movies)</visible>
                            <
onclick condition="IsEmpty(skin.string(SubMenu4))">Skin.Setstring(SubMenu4,open)</onclick>
                            <
onclick condition="!IsEmpty(skin.string(SubMenu4))">Skin.Reset(SubMenu4)</onclick>
                            <
onclick condition="IsEmpty(skin.string(SubMenu4))">Skin.Setstring(SubMenu4,open)</onclick>
                            <
property name="DropdownMenu4">not_empty</property>
                        </
item

I tried using skin.reset like you did but it doesn't work on my skin..

Edit 2:

I see, so you use this
PHP Code:
                    <control type="button">
                        <
onfocus condition="IsEmpty(Container(301).ListItem.Property(DropdownMenu1)">Skin.Setstring(SubMenu1,)</onfocus>
                        <
onfocus condition="IsEmpty(Container(301).ListItem.Property(DropdownMenu2)">Skin.Setstring(SubMenu2,)</onfocus>
                        <
onfocus condition="IsEmpty(Container(301).ListItem.Property(DropdownMenu3)">Skin.Setstring(SubMenu3,)</onfocus>
                        <
onfocus condition="IsEmpty(Container(301).ListItem.Property(DropdownMenu4)">Skin.Setstring(SubMenu4,)</onfocus>
                        <
onfocus condition="IsEmpty(Container(301).ListItem.Property(DropdownMenu5)">Skin.Setstring(SubMenu5,)</onfocus>
                        <
visible allowhiddenfocus="true">false</visible>
                        <
enable>true</enable>
                    </
control

When i tried it on my skin, it becomes extremely slow, maybe because the content is located in another xml file?
Reply
#28
That it is in a different xml should not matter. But how many conditional onfocus / onclick are you using in total each time you move an item in the list? Looking at your previous code snippets you were using 40 something per item and then the ones you added to the new button and the scripts and some animations i bet.

And the example i gave you uses almost none. Not even for the widgets visibility.
Not sure if that is it, but you should check that first, see if you ca't use less code to do the same thing.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#29
@MassIV, hmm i think i use old method cause it's faster,

But i still can't figure out how to set the favs' to close on startup though

on guisettings.xml it looks like this when the first menu's submenu opens and the other closes:

PHP Code:
<setting type="string" name="skin.ace.fav1">open</setting>
        <
setting type="string" name="skin.ace.fav2">open</setting>
        <
setting type="string" name="skin.ace.fav3">open</setting>
        <
setting type="string" name="skin.ace.fav4">open</setting>
        <
setting type="string" name="skin.ace.fav5">open</setting>
        <
setting type="string" name="skin.ace.fav6"></setting>
        <
setting type="string" name="skin.ace.fav7"></setting>
        <
setting type="string" name="skin.ace.fav8"></setting>
        <
setting type="string" name="skin.ace.fav9"></setting>
        <
setting type="string" name="skin.ace.fav10"></setting>
        <
setting type="string" name="skin.ace.fav11"></setting>
        <
setting type="string" name="skin.ace.fav12"></setting>
        <
setting type="string" name="skin.ace.fav13"></setting>
        <
setting type="string" name="skin.ace.fav14"></setting>
        <
setting type="string" name="skin.ace.fav15"></setting>
        <
setting type="string" name="skin.ace.fav16"></setting>
        <
setting type="string" name="skin.ace.fav17"></setting>
        <
setting type="string" name="skin.ace.fav18"></setting>
        <
setting type="string" name="skin.ace.fav19"></setting>
        <
setting type="string" name="skin.ace.fav20"></setting>
        <
setting type="string" name="skin.ace.fav21"></setting>
        <
setting type="string" name="skin.ace.fav22"></setting>
        <
setting type="string" name="skin.ace.fav23"></setting>
        <
setting type="string" name="skin.ace.fav24"></setting>
        <
setting type="string" name="skin.ace.fav25"></setting>
        <
setting type="string" name="skin.ace.fav26"></setting>
        <
setting type="string" name="skin.ace.fav27"></setting>
        <
setting type="string" name="skin.ace.fav28"></setting>
        <
setting type="string" name="skin.ace.fav29"></setting>
        <
setting type="string" name="skin.ace.fav30"></setting>
        <
setting type="string" name="skin.ace.fav31"></setting>
        <
setting type="string" name="skin.ace.fav32"></setting>
        <
setting type="string" name="skin.ace.fav33"></setting>
        <
setting type="string" name="skin.ace.fav34"></setting>
        <
setting type="string" name="skin.ace.fav35"></setting>
        <
setting type="string" name="skin.ace.fav36"></setting>
        <
setting type="string" name="skin.ace.fav37"></setting>
        <
setting type="string" name="skin.ace.fav38"></setting>
        <
setting type="string" name="skin.ace.fav39"></setting>
        <
setting type="string" name="skin.ace.fav40"></setting>
        <
setting type="string" name="skin.ace.fav41"></setting>
        <
setting type="string" name="skin.ace.fav42"></setting>
        <
setting type="string" name="skin.ace.fav43"></setting>
        <
setting type="string" name="skin.ace.fav44"></setting>
        <
setting type="string" name="skin.ace.fav45"></setting

in home.xml, there's this

<include condition="!Skin.HasSetting(welcomedone5)">Startup</include>

so in includes.xml i put this in "startup" include
PHP Code:
    <include name="Startup">
    <
onload>Skin.SetString(fav1,)</onload>
    <
onload>Skin.SetString(fav2,)</onload>
    <
onload>Skin.SetString(fav3,)</onload>
    <
onload>Skin.SetString(fav4,)</onload>
    <
onload>Skin.SetString(fav5,)</onload>
    <
onload>Skin.SetString(fav6,)</onload>
    <
onload>Skin.SetString(fav7,)</onload>
    <
onload>Skin.SetString(fav8,)</onload>
    <
onload>Skin.SetString(fav9,)</onload>
    <
onload>Skin.SetString(fav10,)</onload>
    <
onload>Skin.SetString(fav11,)</onload>
    <
onload>Skin.SetString(fav12,)</onload>
    <
onload>Skin.SetString(fav13,)</onload>
    <
onload>Skin.SetString(fav14,)</onload>
    <
onload>Skin.SetString(fav15,)</onload>
    <
onload>Skin.SetString(fav16,)</onload>
    <
onload>Skin.SetString(fav17,)</onload>
    <
onload>Skin.SetString(fav18,)</onload>
    <
onload>Skin.SetString(fav19,)</onload>
    <
onload>Skin.SetString(fav20,)</onload>
    <
onload>Skin.SetString(fav21,)</onload>
    <
onload>Skin.SetString(fav22,)</onload>
    <
onload>Skin.SetString(fav23,)</onload>
    <
onload>Skin.SetString(fav24,)</onload>
    <
onload>Skin.SetString(fav25,)</onload>
    <
onload>Skin.SetString(fav26,)</onload>
    <
onload>Skin.SetString(fav27,)</onload>
    <
onload>Skin.SetString(fav28,)</onload>
    <
onload>Skin.SetString(fav29,)</onload>
    <
onload>Skin.SetString(fav30,)</onload>
    <
onload>Skin.SetString(fav31,)</onload>
    <
onload>Skin.SetString(fav32,)</onload>
    <
onload>Skin.SetString(fav33,)</onload>
    <
onload>Skin.SetString(fav34,)</onload>
    <
onload>Skin.SetString(fav35,)</onload>
    <
onload>Skin.SetString(fav36,)</onload>
    <
onload>Skin.SetString(fav37,)</onload>
    <
onload>Skin.SetString(fav38,)</onload>
    <
onload>Skin.SetString(fav39,)</onload>
    <
onload>Skin.SetString(fav40,)</onload>
    <
onload>Skin.SetString(fav41,)</onload>
    <
onload>Skin.SetString(fav42,)</onload>
    <
onload>Skin.SetString(fav43,)</onload>
    <
onload>Skin.SetString(fav44,)</onload>
    <
onload>Skin.SetString(fav45,)</onload>
.
.
.
</include> 

But the opened submenu remains open (just like in my video in previous post) any idea why?
I want it to always closes on startup because there's a script that works when the submenu is opened.
And if it opens on startup it kinda screw up the script order...
Reply
#30
Just add <onload>Skin.Reset(skin.ace.fav2)</onload> etc to the startup.xml.
Reply

Logout Mark Read Team Forum Stats Members Help
Creating dropdown menu with auto collapse0