The Dink Network

Keep Mouse on Screen

May 29th 2016, 04:48 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Been fiddling around with this again and having an issue.

How do I stop the reticle from going off screen when controlled with the keyboard? Seems like the mouse brain acts a bit funny in that when it's controlled with your mouse it can't go off screen, but when controlled with the arrow keys it can go off screen as far as you want! Anyone know of an easy workaround?
May 31st 2016, 04:25 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Huh, cool; I didn't know that.

You could put some invisible sprites around the screen with touch damage set to -1 and a script to push the cursor back onto the screen. The cursor can't move the pointer in large steps anyway, so a single pixel box should be enough (but more seems safer; you never know what the engine does).

Does using a map screen with no neighboring screens and setting dink_can_walk_off_screen=0 not fix it?
May 31st 2016, 07:53 PM
peasantmp.gif
Skurn
Peasant He/Him Equatorial Guinea duck bloop
can't flim flam the glim glam 
now you can attack other screens.