2015-06-13, 16:41
I am attempting to replace my home menu code with script.skinshortcuts. The items are successfully built, but I am having difficulties replicating the current animation effects. The menu was built the same way Confluence builds its home menu, with a fixedlist for the main menu, and grouplists of buttons for the submenu. Each grouplist has Visible and Hidden animations applied to have the buttons "bounce" in and out of visibility as the main menu item changed.
I am trying to replicate this behavior with a list containing the submenu items that script.skinshortcuts generates. I have been able to get the Visible action to work as expected, but the hidden animation seems to get interrupted by the list item visibility (at least that's my best guess).
Here is the code I am currently working with:
Is there any way to force the Hidden animation to fire completely before the submenu list refreshes with the "new" submenu items?
Also, is there any way to center a list horizontally? The submenu will have differing numbers of items depending on the main menu chosen. I can't seem to get the submenu to be centered unless I apply slide animations that account for each possible position based on number of items in the submenu list.
I am trying to replicate this behavior with a list containing the submenu items that script.skinshortcuts generates. I have been able to get the Visible action to work as expected, but the hidden animation seems to get interrupted by the list item visibility (at least that's my best guess).
Here is the code I am currently working with:
Code:
<!--sub menu-->
<control type="group">
<visible>!Container(9000).OnNext + !Container(9000).OnPrevious</visible>
<animation effect="slide" start="0,-60" end="0,0" delay="200" time="200" tween="quadratic" reversible="false">Visible</animation>
<animation effect="slide" start="0,0" end="0,-60" time="200" tween="quadratic" reversible="false">Hidden</animation>
<control type="list" id="9901">
<left>150</left>
<top>37</top>
<width>1620</width>
<height>70</height>
<onup>9000</onup>
<ondown>9002</ondown>
<itemgap>0</itemgap>
<orientation>horizontal</orientation>
<itemlayout width="270" height="60">
...
</itemlayout>
<focusedlayout width="270" height="60">
...
</focusedlayout>
<content>
<include>skinshortcuts-submenu</include>
</content>
</control>
</control>
<!--main menu-->
<control type="fixedlist" id="9000">
<left>60</left>
<top>8</top>
<width>1800</width>
<height>90</height>
<onleft>9000</onleft>
<onright>9000</onright>
<onup condition="System.HasAddon(script.globalsearch)">608</onup>
<onup condition="!System.HasAddon(script.globalsearch)">603</onup>
<ondown>9901</ondown>
<pagecontrol>-</pagecontrol>
<scrolltime>300</scrolltime>
<focusposition>2</focusposition>
<movement>1</movement>
<orientation>Horizontal</orientation>
<itemlayout height="90" width="360">
...
</itemlayout>
<focusedlayout height="90" width="360">
...
</focusedlayout>
<content>
<include>skinshortcuts-mainmenu</include>
</content>
</control>
Is there any way to force the Hidden animation to fire completely before the submenu list refreshes with the "new" submenu items?
Also, is there any way to center a list horizontally? The submenu will have differing numbers of items depending on the main menu chosen. I can't seem to get the submenu to be centered unless I apply slide animations that account for each possible position based on number of items in the submenu list.