mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
Added menuenter and menuexit tween order based on if entering or exiting menu.
This commit is contained in:
parent
9376668581
commit
6601457a8d
@ -1,69 +1,308 @@
|
||||
<layout width="1920" height="1080" font="Roboto-Bold.ttf" loadFontSize="32" fontColor="eeeeee">
|
||||
<layout width="1920" height="1080" font="LoveloBlack.otf" loadFontSize="48" fontColor="000000">
|
||||
<sound type="load" src="load.wav" />
|
||||
<sound type="unload" src="unload.wav" />
|
||||
<sound type="highlight" src="highlight.wav" />
|
||||
<sound type="select" src="select.wav" />
|
||||
|
||||
<!-- background -->
|
||||
<container backgroundColor="C0392B" backgroundAlpha="1.0" x="0" y="0" height="stretch" width="stretch" layer="0"/>
|
||||
|
||||
<!-- Item name and border -->
|
||||
<container backgroundColor="FFFFFF" backgroundAlpha="0.3" x="0" y="bottom" yOrigin="center" yOffset="-100" height="100" width="stretch" layer="4"/>
|
||||
<reloadableText type="title" x="20" y="bottom" yOrigin="center" yOffset="-90" height="80" layer="5">
|
||||
<onHighlightEnter>
|
||||
<set duration=".2">
|
||||
<animate type="x" from="right" to="20" algorithm="easeinquadratic"/>
|
||||
<animate type="xOrigin" from="right" to="left" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightEnter>
|
||||
<onHighlightExit>
|
||||
<set duration=".2">
|
||||
<animate type="x" from="20" to="left" algorithm="easeinquadratic"/>
|
||||
<animate type="xOrigin" from="left" to="right" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightExit>
|
||||
</reloadableText>
|
||||
|
||||
<reloadableVideo width="200" height="200" imageType="title">
|
||||
</reloadableVideo>
|
||||
<!-- menu -->
|
||||
<menu type="custom" imageType="title" algorithm="easeincircular" xOffset="500" y="10" width="center" height="1040" speed="0.05" acceleration="0.05">
|
||||
<itemDefaults spacing="10" y="center" yOrigin="center" fontSize="35" alpha="0.5" layer="5"/>
|
||||
<item height="300" alpha="0.5" xOrigin="left" x="left">
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="1" to="0" algorithm="easeincircular"/>
|
||||
<container backgroundColor="4A4A4A" backgroundAlpha="1.0" x="0" y="0" height="stretch" width="stretch" layer="0"/>
|
||||
<!-- backgroundImage -->
|
||||
<!-- <image src="bkgd.png" x="0" y="0" height="stretch" width="stretch" layer="0"/> -->
|
||||
<!-- background -->
|
||||
|
||||
|
||||
|
||||
<!-- ---------------MAIN MENU--------------- -->
|
||||
|
||||
<!-- Main Menu Background -->
|
||||
<image src="barbkgrnd.png" x="0" y="center" yOrigin="center" height="132" width="1920" layer="5">
|
||||
<onMenuExit menuIndex="0">
|
||||
<set duration=".4">
|
||||
<animate type="yOffset" from="320" to="800" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item alpha="1" x="center" xOrigin="center" selected="true" height="700">
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="1" to="0.25" algorithm="easeincircular"/>
|
||||
<onMenuEnter menuIndex="0">
|
||||
<set duration=".4">
|
||||
<animate type="yOffset" from="800" to="320" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
</image>
|
||||
<!-- Main Menu Background -->
|
||||
|
||||
<!-- Main Menu index 0 -->
|
||||
<menu type="custom" imageType="logo" orientation="horizontal" x="0" width="center" y="center" yOffset="320" algorithm="easeincircular" speed="0.04" acceleration="0.05">
|
||||
<itemDefaults xOrigin="center" y="center" yOrigin="center" width="300" spacing="10" x="center" yOffset="320" alpha="0.5" fontSize="35" layer="6"/>
|
||||
<item xOffset="-1420" alpha="0" />
|
||||
<item xOffset="-1060">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item xOffset="-720">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item xOffset="-380">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item selected="true" width="400" layer="7" alpha="1">
|
||||
<onMenuExit>
|
||||
<set duration=".4">
|
||||
<animate type="yOffset" from="320" to="-440" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
<onMenuEnter>
|
||||
<set duration=".4">
|
||||
<animate type="yOffset" from="-440" to="320" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
</item>
|
||||
<item xOffset="380">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item xOffset="720">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item xOffset="1060">
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="0.5" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.5" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
<item xOffset="1420" alpha="0" />
|
||||
</menu>
|
||||
<!-- Main Menu index 0 -->
|
||||
|
||||
<!-- ---------------SUB MENU--------------- -->
|
||||
|
||||
<!-- Sub Menu index 1 -->
|
||||
<menu orientation="horizontal" algorithm="easeincircular" y="75" width="600" height="920" speed="0.5" acceleration="0.05">
|
||||
<itemDefaults spacing="5" x="center" height="34" width="600" fontSize="28" alpha="1" xOffset="100" yOrigin="center" xOrigin="left" layer="5">
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="1" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to="1" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
</itemDefaults>
|
||||
<item index="start" spacing="0" alpha="0"/>
|
||||
<item index="11" spacing="0" height="48" fontSize="48" alpha="1" selected="true">
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="1" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
<onMenuEnter>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0.25" to="1" algorithm="easeincircular"/>
|
||||
</set>
|
||||
<animate type="alpha" from="0" to="1" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
</item>
|
||||
<item height="30" alpha="0.5" xOrigin="right" x="right">
|
||||
<onMenuExit>
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="1" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</item>
|
||||
</menu>
|
||||
<menu algorithm="easeincircular" x="1500" y="10" width="center" height="1040" speed="0.05" acceleration="0.05">
|
||||
<itemDefaults spacing="10" x="1500" height="80" fontSize="50" alpha="0.5" layer="5" xOrigin="center"/>
|
||||
<item alpha="0" index="start" height="0" />
|
||||
<item alpha="1" index="first" height="100" fontSize="70" selected="true"/>
|
||||
<item alpha="0" index="end" height="0" />
|
||||
<item index="last" spacing="10.5" alpha="0"/>
|
||||
<item index="end" spacing="10.5" alpha="0"/>
|
||||
</menu>
|
||||
</layout>
|
||||
<!-- Sub Menu index 1 -->
|
||||
|
||||
<!-- Sub Menu Video Background -->
|
||||
<container backgroundColor="CACACA" backgroundAlpha="0" yOrigin="center" xOrigin="center" x="525" y="center" yOffset="-80" width="528" height="400" layer="4">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="backgroundAlpha" from="0" to="1" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="backgroundAlpha" from="1" to="0" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
|
||||
<container backgroundColor="24C0EB" backgroundAlpha="0" yOrigin="center" xOrigin="center" x="525" y="center" yOffset="-80" width="532" height="404" layer="3">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="backgroundAlpha" from="0" to="1" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="backgroundAlpha" from="1" to="0" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
<!-- Sub Menu Video Background -->
|
||||
|
||||
<!-- Sub Menu List Background -->
|
||||
<container backgroundColor="CACACA" backgroundAlpha="1" xOrigin="left" xOffset="1002" x="center" yOrigin="center" y="center" height="1000" width="900" layer="4">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="1002" to="85" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="85" to="1002" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
|
||||
<container backgroundColor="24C0EB" backgroundAlpha="1" xOrigin="left" xOffset="1000" x="center" yOrigin="center" y="center" height="1004" width="900" layer="3">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="1000" to="83" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="83" to="1000" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
<!-- Sub Menu List Background -->
|
||||
|
||||
<!-- Sub Menu Snap as Background -->
|
||||
|
||||
<!-- Sub Menu Snap as Background -->
|
||||
|
||||
<!-- Sub Menu List Background Wrap -->
|
||||
<container backgroundColor="CACACA" backgroundAlpha="1" xOffset="-30" xOrigin="left" yOrigin="center" y="center" height="1000" width="16" layer="4">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="-30" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="0" to="-30" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
|
||||
<container backgroundColor="24C0EB" backgroundAlpha="1" xOffset="-34" xOrigin="left" yOrigin="center" y="center" height="1004" width="18" layer="3">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="-34" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="xOffset" from="0" to="-34" algorithm="easeoutcircular"/>
|
||||
</set>
|
||||
</onMenuExit>
|
||||
</container>
|
||||
<!-- Sub Menu Left Filler Background Wrap -->
|
||||
|
||||
<reloadableVideo imageType="snap" x="center" y="center" yOrigin="center" layer="4" xOrigin="center" >
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".25">
|
||||
<animate type="x" from="center" to="525"/>
|
||||
<animate type="yOffset" from="0" to="-80" />
|
||||
<animate type="width" from="1920" to="512"/>
|
||||
<animate type="height" from="1440" to="384" />
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuEnter menuIndex="0">
|
||||
<set duration=".25">
|
||||
<animate type="x" to="center" from="525"/>
|
||||
<animate type="yOffset" to="0" from="-80" />
|
||||
<animate type="width" to="1920" from="512" />
|
||||
<animate type="height" to="1440" from="384" />
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onHighlightEnter menuIndex="0">
|
||||
<set duration=".2">
|
||||
<animate type="alpha" from="0" to="0.2" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightEnter>
|
||||
<onHighlightExit menuIndex="0">
|
||||
<set duration=".2">
|
||||
<animate type="alpha" from="0.2" to="0" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightExit>
|
||||
<onHighlightEnter menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="alpha" from="0" to="1" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightEnter>
|
||||
<onHighlightExit menuIndex="1">
|
||||
<set duration=".2">
|
||||
<animate type="alpha" from="1" to="0" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightExit>
|
||||
</reloadableVideo>
|
||||
|
||||
<reloadableImage type="snap" x="0" y="-174" height="1440" width="1920" layer="4">
|
||||
<onMenuEnter menuIndex="1">
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to=".2" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onMenuEnter menuIndex="0">
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from=".2" to="0" algorithm="easeincircular"/>
|
||||
</set>
|
||||
</onMenuEnter>
|
||||
<onHighlightEnter menuIndex="1">
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from="0" to=".2" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightEnter>
|
||||
<onHighlightExit menuIndex="1">
|
||||
<set duration=".25">
|
||||
<animate type="alpha" from=".2" to="0" algorithm="easeinquadratic"/>
|
||||
</set>
|
||||
</onHighlightExit>
|
||||
</reloadableImage>
|
||||
|
||||
</layout>
|
||||
@ -201,17 +201,18 @@ void Component::Update(float dt)
|
||||
EnterRequested = false;
|
||||
NewItemSelected = false;
|
||||
}
|
||||
else if(MenuExitRequested)
|
||||
else if(MenuExitRequested && (!MenuEnterRequested || MenuExitRequested <= MenuEnterRequested))
|
||||
{
|
||||
MenuExitRequested = false;
|
||||
CurrentTweens = Tweens->GetTween("menuExit", MenuExitIndex);
|
||||
CurrentAnimationState = MENU_EXIT;
|
||||
MenuExitRequested = false;
|
||||
}
|
||||
else if(MenuEnterRequested)
|
||||
else if(MenuEnterRequested && (!MenuExitRequested || MenuExitRequested > MenuEnterRequested))
|
||||
{
|
||||
MenuEnterRequested = false;
|
||||
CurrentTweens = Tweens->GetTween("menuEnter", MenuEnterIndex);
|
||||
CurrentAnimationState = MENU_ENTER;
|
||||
MenuEnterRequested = false;
|
||||
|
||||
}
|
||||
else if(MenuScrollRequested)
|
||||
{
|
||||
@ -274,13 +275,14 @@ void Component::Update(float dt)
|
||||
CurrentTweens = Tweens->GetTween("enter", MenuEnterIndex);
|
||||
CurrentAnimationState = ENTER;
|
||||
}
|
||||
else if(MenuExitRequested)
|
||||
|
||||
else if(MenuExitRequested && (!MenuEnterRequested || MenuExitRequested <= MenuEnterRequested))
|
||||
{
|
||||
CurrentTweens = Tweens->GetTween("menuExit", MenuExitIndex);
|
||||
CurrentAnimationState = MENU_EXIT;
|
||||
MenuExitRequested = false;
|
||||
}
|
||||
else if(MenuEnterRequested)
|
||||
else if(MenuEnterRequested && (!MenuExitRequested || MenuExitRequested > MenuEnterRequested))
|
||||
{
|
||||
CurrentTweens = Tweens->GetTween("menuEnter", MenuEnterIndex);
|
||||
CurrentAnimationState = MENU_ENTER;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user