0 Favourites

How do I make a scrolling menu

  • hi guys, how can I make a scrolling menu with gamepad.

    It should scroll vertically and snapp to the next menu text underneed or above ...

    example:

    a

    b

    C

    d

    e

    f

    g

    scrolling from C down..the movement should be snapping...not smooth...any sample that u can show me ?

    thanks a lot

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Global Var MenuSelect

    Global Var MenuSelectPx

    Global Var GoSelect

    Create Object MenuSelect as Bar Color (Opacity 40 (Ex))

    Start Layout MenuSelect = 1 (A)

    MenuSelectPx = Inicial Pos Y Menu A (Ex: 400)

    A=1 <- Selected MenuSelect Bar Color - Pos Y of A(Ex: 400)

    B=2

    C=3

    D=4

    E=5

    F=6

    Distance between menu texts (ex: 40 px)

    Gamepad:

    On Game Pad DPad Down MenuSelect = Min(6,MenuSelect + 1)

    On Game Pad DPad Up MenuSelect = Max(1,MenuSelect - 1)

    Mouse:

    On mouse over A - MenuSelect = 1

    On mouse over b - MenuSelect = 2

    Etc...

    Every Tick: MenuSelect "<-(bar color)" lerp(Self.y,MenuSelectPx+(MenuSelect*40),10*dt)

    Or

    Event: MenuSelect <> 0 and trigger once

    MenuSelect (Bar Color) Destroy

    Create Object MenuSelect (Bar Color) Pos X (ex: 1100) Pos Y MenuSelectPx+(MenuSelect*40)

    On click:

    GamePad Button A - GoSelect = 1

    On Mouse click - GoSelect = 1

    Event: System Global GoSelect = 1

    SubEvent - MenuSelect = 1 Goto Layout x

    SubEvent - MenuSelect = 2 Goto Layout y

    SubEvent - MenuSelect = 3 Goto Layout z

    SubEvent - etc...

    I think this is it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,489
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,819
minhcuong's avatar
minhcuong
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff