mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Replace manual check with SDL_PointInRect
This commit is contained in:
parent
63620efac8
commit
55a05342e9
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ namespace level_debugger
|
||||||
|
|
||||||
bool mouse_within(SDL_Rect* rect)
|
bool mouse_within(SDL_Rect* rect)
|
||||||
{
|
{
|
||||||
return key.mx >= rect->x && key.mx < rect->x + rect->w &&
|
SDL_Point mouse = { key.mx, key.my };
|
||||||
key.my >= rect->y && key.my < rect->y + rect->h;
|
return SDL_PointInRect(&mouse, rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_forced(void)
|
void set_forced(void)
|
||||||
|
|
Loading…
Reference in a new issue