rewrite Move_cursor_with_constraints() to clip negative coordinates

also introduce Handle_mouse_btn_change() so we don't bother to
check everything when only the mouse button state changed
This commit is contained in:
Thomas Bernard
2019-02-08 10:32:48 +01:00
parent 546a6fecd2
commit a633bd88dd
3 changed files with 174 additions and 176 deletions

View File

@@ -49,7 +49,8 @@ int Has_shortcut(word function);
/// Adjust mouse sensitivity (and actual mouse input mode)
void Adjust_mouse_sensitivity(word fullscreen);
int Move_cursor_with_constraints(int);
int Move_cursor_with_constraints(int x, int y);
int Handle_mouse_btn_change(void);
///
/// This holds the ID of the GUI control that the mouse