adding submenu items
#1
I have added new menu options to some of the submenus. In doing so, where the total number of options has increased from the default, the selection graphic gets a little messed up when it animates. Scrolling down works fine, but when scrolling up from the last menu item to the next to last, the animation jumps to the top then come back down. How can I add or remove sub-menu items and still have the selection graphic animate smoothly?
Reply
#2
kricker

Sounds like you haven't updated all your id's properly. If you want post the affected code here and we'll take a look.

D
Reply
#3
JustMeD Wrote:kricker

Sounds like you haven't updated all your id's properly. If you want post the affected code here and we'll take a look.

D
Will do later today. Thanks.
Reply
#4
Okay. Here is the code for the MyTV section which I changed around submenu items.

Code:
<control type="list" id="408">
          <description>TV Shows Side Menu</description>
          <onup>408</onup>
          <ondown>408</ondown>
          <visible>[Container(300).HasFocus(8) | Control.HasFocus(408)] + ![Container(300).OnNext | Container(300).OnPrevious]</visible>
          <include>HomeSideMenu</include>

          <focusedlayout width="HomeSideMenuItemWidth" height="HomeSideMenuItemHeight">
            <control type="image">
              <include>HomeSideMenuNFBGImage</include>
            </control>
            <control type="label">
              <include>HomeSideMenuNFBGLabel</include>
            </control>
            <control type="image">
              <include>HomeSideMenuFOBGImage</include>
              <animation effect="slide" start="0,202" end="0,0" time="500" reversible="false" tween="quadratic" easing="out" condition="Container(408).OnNext + Container(408).Position(0)">focus</animation>
              <animation effect="slide" start="0,-43" end="0,0" time="400" reversible="false" tween="quadratic" easing="out" condition="Container(408).OnNext + !Container(408).Position(0)">focus</animation>
              <animation effect="slide" start="0,-202" end="0,0" time="500" reversible="false" tween="quadratic" easing="out" condition="Container(408).OnPrevious + Container(408).Position(5)">focus</animation>
              <animation effect="slide" start="0,43" end="0,0" time="400" reversible="false"  tween="quadratic" easing="out" condition="Container(408).OnPrevious + !Container(408).Position(5)">focus</animation>
            </control>
            <control type="label">
              <include>HomeSideMenuFOBGLabel</include>
              <animation effect="fade" start="0" end="100" time="200" delay="300" reversible="false" condition="Container(408).OnNext">focus</animation>
              <animation effect="fade" start="0" end="100" time="200" delay="300" reversible="false" condition="Container(408).OnPrevious">focus</animation>
            </control>
           </focusedlayout>

          <content>
<!--
            <item id="1">
              <description>Browse Button</description>
              <label> $LOCALIZE[31000] </label>
              <onclick>XBMC.ActivateWindow(24)</onclick>
            </item>
-->
            <item id="2">
              <description>SageTV</description>
              <label> SageTV</label>
              <onclick>XBMC.System.Exec("C:\Program Files\EventGhost\EventGhost.exe" -e mytv)</onclick>      
            </item>
            <item id="3">
              <description>By Genre</description>
              <label> $LOCALIZE[31044] $LOCALIZE[515] </label>
              <onclick>XBMC.ActivateWindow(MyVideoLibrary,tvshowgenres,return)</onclick>
            </item>
            <item id="4">
              <description>By Year</description>
              <label> $LOCALIZE[31044] $LOCALIZE[345] </label>
              <onclick>XBMC.ActivateWindow(MyVideoLibrary,tvshowyears,return)</onclick>
            </item>
            <item id="5">
              <description>By Actor</description>
              <label> $LOCALIZE[31044] $LOCALIZE[20337] </label>
              <onclick>XBMC.ActivateWindow(MyVideoLibrary,tvshowactors,return)</onclick>
            </item>
            <item id="6">
              <description>Recently Added</description>
              <label> $LOCALIZE[31045] </label>
              <onclick>XBMC.ActivateWindow(MyVideoLibrary,recentlyaddedepisodes,return)</onclick>
            </item>
            <item id="7">
              <description>Update Library</description>
              <label> Update Library</label>
              <onclick>XBMC.UpdateLibrary(video,smb://PVR/Archived TV/)</onclick>
            </item>
            <item id="8">
              <description>Settings Button</description>
              <label> $LOCALIZE[31060] </label>
              <onclick>XBMC.ActivateWindow(17)</onclick>
            </item>
          </content>
        </control>
Reply
#5
Anyone got any ideas?
Reply
#6
I've tried changing all kinds of things, but I have had no luck so far.
Reply
#7
WOOT! I finally figured it out. I had to change the lines:
Code:
<animation effect="slide" start="0,-116" end="0,0" time="500" reversible="false" tween="quadratic" easing="out" condition="Container(404).OnPrevious + Container(404).Position(3)">focus</animation>
              <animation effect="slide" start="0,43" end="0,0" time="400" reversible="false"  tween="quadratic" easing="out" condition="Container(404).OnPrevious + !Container(404).Position(3)">focus</animation>
and change the
Code:
Position(3)
to match the number of choices I now had -1. So for 4 options it would be 3, and for 6 options it would be 7. This is because the count starts at 0. I knew there had to be a place that was telling it how many choices there were in a menu, but I just couldn't track it down 'til now.
Reply

Logout Mark Read Team Forum Stats Members Help
adding submenu items0