- [NEW] mouse.inside(x,y,w,h)

- [WIP] fonted tool
This commit is contained in:
2025-12-09 14:05:12 +01:00
parent eac20bbbe0
commit 6e15fe7231
6 changed files with 232 additions and 126 deletions

View File

@@ -1329,6 +1329,12 @@ void mdiscard() {
mouse_discard = true;
}
bool minside(int x, int y, int w, int h) {
const int mx = mouse_x-ds::origin[0];
const int my = mouse_y-ds::origin[1];
return (mx>=x) && (my>=y) && (mx<x+w) && (my<y+h);
}
float time() {
return float(SDL_GetTicks())/1000.0f;
}