Author Topic: How to add "var" in "transition( ttype, var, ttime )"  (Read 82 times)

rand0m

  • Sr. Member
  • ****
  • Posts: 220
    • View Profile
How to add "var" in "transition( ttype, var, ttime )"
« on: July 08, 2019, 02:51:14 AM »
Hi, I'm a bit stuck in transition code. Can anyone please guide me in following:

1- How do I add a "var" variable in case of "transition( ttype, var, ttime )"? The following code (a bit modified) is from FrizzleFried's "Now Loading" plugin >
Code: [Select]
function launch_transition( ttype, var, ttime ) {
switch ( ttype )
{
case Transition.ToNewList:

As per AM wiki
Quote
When ttype is Transition.ToNewList, var indicates the filter index offset of the filter being transitioned to (i.e. -1 when moving back one filter, 1 when moving forward) if known, otherwise var is 0.

So I would like to make two instances, one when I press select and move forward in the displays menu (i.e. Platforms > Arcades) and one when i press back (i.e. Platforms < Arcades or Arcades > Platform). I have tried experimenting but can't figure out how/ where to instruct AM that var is +1/ -1.

2- I also don't know if filters (as in AM wiki quoted above) can be used for moving within displays or if the displays listed within Displaysmenu will be treated as rom items (i.e. game).

What I am aiming to do is flash a screen-wide front/ back arrow depending upon the movement within the displaysmenu. I am thinking of making two transition functions of new list one with var +1 and one with var -1.

Thanks.
« Last Edit: July 08, 2019, 02:53:43 AM by rand0m »