JD2022-TU1/data/World/ui/components/carousel_exemple.act

221 lines
5.6 KiB
Text

includeReference("EngineData/Helpers/Carousel.ilu")
params =
{
NAME = "SubSceneActor",
SubSceneActor =
{
LUA = "world/ui/components/carousel.tpl",
COMPONENTS =
{
{
NAME = "JD_Carousel",
JD_Carousel =
{
mainAnchor="3",
carouselDataID = "avatar_row",
validateAction="MENU_VALID",
initialBehaviour = "Navigation",
behaviours =
{
{
NAME = "CarouselBehaviour_Navigation",
KEY = "Navigation",
VAL =
{
CarouselBehaviour_Navigation =
{
animSetupID = "navigation_default",
decelTapeLabel = "DECEL",
nextActions =
{
{
VAL = "MENU_LSTICK_RIGHT",
},
{
VAL = "MENU_DPAD_RIGHT",
},
{
VAL="MENU_PHONE_RIGHT",
},
},
prevActions =
{
{
VAL = "MENU_LSTICK_LEFT",
},
{
VAL = "MENU_DPAD_LEFT",
},
{
VAL="MENU_PHONE_LEFT",
},
},
stopConditions =
{
{
StopCondition =
{
condition = StopConditionType.InCarouselAnimState,
animState = CarouselAnimState.Idle,
waitingTime = 5.0,
nextBehaviour = "AutoScroll",
}
},
{
StopCondition =
{
condition = StopConditionType.OnStepDone,
countToReach = 1,
nextBehaviour = "NavigationContinous",
}
},
{
StopCondition =
{
condition = StopConditionType.OnUserAction,
nextBehaviour = "NavigationFast",
actions =
{
{
VAL = "MENU_SHOULDER_RIGHT",
},
{
VAL = "MENU_SHOULDER_LEFT",
},
},
}
},
}
},
},
},
{
NAME = "CarouselBehaviour_Navigation",
KEY = "NavigationContinous",
VAL =
{
CarouselBehaviour_Navigation =
{
animSetupID = "navigation_default",
decelTapeLabel = "DECEL_CONTINOUS",
scrollMode = CarouselScrollMode.Continuous,
nextActions =
{
{
VAL = "MENU_LSTICK_RIGHT",
},
{
VAL = "MENU_DPAD_RIGHT",
},
{
VAL="MENU_PHONE_RIGHT",
},
},
prevActions =
{
{
VAL = "MENU_LSTICK_LEFT",
},
{
VAL = "MENU_DPAD_LEFT",
},
{
VAL="MENU_PHONE_LEFT",
},
},
stopConditions =
{
{
StopCondition =
{
condition = StopConditionType.EnterCarouselAnimState,
nextBehaviour = "Navigation",
animState = CarouselAnimState.Idle,
}
},
{
StopCondition =
{
condition = StopConditionType.OnUserAction,
nextBehaviour = "NavigationFast",
actions =
{
{
VAL = "MENU_SHOULDER_RIGHT",
},
{
VAL = "MENU_SHOULDER_LEFT",
},
},
}
},
}
},
},
},
{
NAME = "CarouselBehaviour_Navigation",
KEY = "NavigationFast",
VAL =
{
CarouselBehaviour_Navigation =
{
animSetupID = "navigation_default_fast",
decelTapeLabel = "DECEL_FAST",
nextActions =
{
{
VAL = "MENU_SHOULDER_RIGHT",
},
},
prevActions =
{
{
VAL = "MENU_SHOULDER_LEFT",
},
},
stopConditions =
{
{
StopCondition =
{
condition = StopConditionType.EnterCarouselAnimState,
nextBehaviour = "Navigation",
animState = CarouselAnimState.Idle,
}
},
}
},
},
},
{
NAME = "CarouselBehaviour_AutoScroll",
KEY = "AutoScroll",
VAL =
{
CarouselBehaviour_AutoScroll =
{
animSetupID = "navigation_default",
decelTapeLabel = "DECEL_AUTOSCROLL",
scrollMode = CarouselScrollMode.Step,
timeBetweenStep = 5.0,
stopConditions =
{
{
StopCondition =
{
condition = StopConditionType.OnUserAction,
nextBehaviour = "Navigation",
}
},
}
},
},
},
},
}
}
}
},
}