Scroll Menu when Mouse at Edge

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

    237 Posts


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

    GameCursorHorizontalScrollDistance 
    GameCursorVerticalScrollDistance

    will check this first

    Forum Fan

    237 Posts

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

    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

    6812 Posts

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

    Forum Fan

    237 Posts

Write post