From 879fb2adefadbc5f38711cd8f01bcc4cee053e3d Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Tue, 2 Mar 2021 09:44:19 +0100 Subject: i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32 --- render/button.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'render/button.c') diff --git a/render/button.c b/render/button.c index eb96f59..8896f36 100644 --- a/render/button.c +++ b/render/button.c @@ -1,14 +1,14 @@ #include #include -#include +#include "button.h" -#include +#include "../umath/intersect.h" -bool mouse_in_button (float pt[], txtd *t, button *b) { +int mouse_in_button (float pt[], txtd *t, button *b) { int width = get_text_width(b->txt, t); float size[2] = { width+b->pad*2, 10+b->pad*2 }; - if (pt_rect(pt, b->pos, size)) return true; - return false; + if (pt_rect(pt, b->pos, size)) return 1; + return 0; } void render_button (SDL_Renderer* rend, txtd *t, button *b) { -- cgit v1.2.3-54-g00ecf