Scroll Menu when Mouse at Edge

  • #1, by dionousWednesday, 06. September 2017, 10:37 7 years ago
    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

    246 Posts


  • #2, by dionousWednesday, 06. September 2017, 10:39 7 years ago
    Ok i think i found smth:

    GameCursorHorizontalScrollDistance 
    GameCursorVerticalScrollDistance

    will check this first

    Forum Fan

    246 Posts

  • #3, by afrlmeWednesday, 06. September 2017, 11:53 7 years ago
    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

    7278 Posts

  • #4, by dionousWednesday, 06. September 2017, 12:23 7 years ago
    That's correct, thanks mate smile

    Forum Fan

    246 Posts