mirror of
https://github.com/cy384/ssheven.git
synced 2026-05-15 14:15:58 -06:00
basic mouse support
This commit is contained in:
parent
af285b6e6c
commit
f119a63078
3 changed files with 18 additions and 0 deletions
|
|
@ -646,6 +646,7 @@ void event_loop(void)
|
|||
int exit_event_loop = 0;
|
||||
EventRecord event;
|
||||
WindowPtr eventWin;
|
||||
Point local_mouse_position;
|
||||
|
||||
// maximum length of time to sleep (in ticks)
|
||||
// GetCaretTime gets the number of ticks between system caret on/off time
|
||||
|
|
@ -713,9 +714,15 @@ void event_loop(void)
|
|||
break;
|
||||
|
||||
case inContent:
|
||||
GetMouse(&local_mouse_position);
|
||||
mouse_click(local_mouse_position, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case mouseUp:
|
||||
GetMouse(&local_mouse_position);
|
||||
mouse_click(local_mouse_position, false);
|
||||
break;
|
||||
}
|
||||
|
||||
YieldToAnyThread();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue