aboutsummaryrefslogtreecommitdiff
path: root/render/button.c
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-03-02 09:44:19 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-03-02 09:44:19 +0100
commit879fb2adefadbc5f38711cd8f01bcc4cee053e3d (patch)
tree63d9841f0dd321978714dd5839cb6f8c3c8df57e /render/button.c
parent2f345b1d6e130177efe4fa47d5b2bd11f352ce85 (diff)
i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32
Diffstat (limited to 'render/button.c')
-rw-r--r--render/button.c10
1 files changed, 5 insertions, 5 deletions
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 <stdlib.h>
#include <stdio.h>
-#include <button.h>
+#include "button.h"
-#include <intersect.h>
+#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) {