Menu
Login
Language
DE EN FR ES IT CZ
Back

Scroll Menu when Mouse at Edge

  • #1, by dionous Wednesday, 06. September 2017, 10:37 8 years ago Quote
    Hello all,

    I have a menu scene that scrolls when the mouse is at the edge. Would it be possible to adjust the scroll area away from the edge which will trigger the scroll? I.e. to trigger the scroll not at the edge but when mouse is at x (or y) pixels away from the edge?

    Thanks!

    Forum Fan

    250 Posts

  • #2, by dionous Wednesday, 06. September 2017, 10:39 8 years ago Quote
    Ok i think i found smth:

    GameCursorHorizontalScrollDistance 
    GameCursorVerticalScrollDistance

    will check this first

    Forum Fan

    250 Posts

  • #3, by afrlme Wednesday, 06. September 2017, 11:53 8 years ago Quote
    Ok i think i found smth:

    GameCursorHorizontalScrollDistance 
    GameCursorVerticalScrollDistance

    will check this first
    Yes, those are the correct data structure fields for doing what you are asking...
    game.CursorHorizontalScrollDistance = 200
    game.CursorVerticalScrollDistance = 200

    Take in mind that it is the same distance from both sides. If you set 200 to horizontal scroll distance, then it's 200px from both the left & right side of the screen edge.

    Imperator

    7290 Posts

  • #4, by dionous Wednesday, 06. September 2017, 12:23 8 years ago Quote
    That's correct, thanks mate smile

    Forum Fan

    250 Posts