Author Topic: Help Setting up menus  (Read 3528 times)

theherooftime796

  • Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Help Setting up menus
« on: April 19, 2017, 12:39:56 PM »
I've been looking at other skin's scrolling menus, and they all look rather complicated and utilise the attribute "menuIndex". I've checked the wiki/manual, but I can't find any documentation for what this actually does. There is an attribute index, which can be applied to the <menu> tag but i'm not sure it's the same - I seem to only see menuIndex applied to animations. Does it relate to which submenu is being addressed (menuIndex=0 is top level, 2 is collection, etc). If so, if there is a serperate layout loaded per collection (e.g. ".\layouts\MyLayout\collections\Nintendo Entertainment System\layouts\layout.xml"), is this variable even necessary.
Are there any problems with this menu for the top level?

Quote
   <!-- Menu Wheel - Menu Index 0-->
   <menu type="custom" imageType="logo" mode="layout" orientation="vertical" width="750" height="268" scrollTime=".12" scrollAcceleration=".04">
      <itemDefaults spacing="0" y="center" x="1303" fontSize="35" width="449" width="160" layer="13"/>
      <item yOffset="-154" alpha="0">
      </item>
    <item y="-7" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
      <item y="137" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
      <item y="283" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
    <item y="406" xOffset="-150" layer="14" fontSize="50" width="748" height="267" alpha="1" selected="true">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
      <item y="641" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>      </item>
    <item y="785" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
      <item y="930" alpha="1">
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
      <item y="1245" alpha="0" >
   <onMenuScroll>
   <set duration="0">
   <animate type="alpha" to="1" algorithm="easeinquadratic"/>
   </set>
   </onMenuScroll>
   <onIdle>
   <set duration="2">
   <animate type="nop"/>
   </set>
   <set duration="1.2">
   <animate type="alpha" to="0" algorithm="easeinquadratic"/>
   </set>
   </onIdle>
      </item>
   </menu>


It's much simpler than those I've seen in other layouts. Any help would be much appreciated.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Help Setting up menus
« Reply #1 on: April 19, 2017, 12:50:22 PM »
In earlier versions of RetroFE, this would indeed work, since menus were automatically assigned an index when created (0 for main menu, 1 for the next level, 2 for the level after that, etc.), but could only be animated at their own level. Since theme developers requested that they wanted to be able to animate the menus at any level, the automatic assignment remained, but the animation would always activate. That's why the menuIndex is used for the menu animations these days. It's more work to do it this way, and it requires a menu entry for any level you want to see a menu at, but it also allows you to e.g. show (part of) the main menu wheel, and even animate it, while walking through a collection's menu.