summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorveradec <glitchmill.dyj3d@simplelogin.co>2026-10-23 19:09:38 +0530
committerveradec <glitchmill.dyj3d@simplelogin.co>2026-10-23 19:09:38 +0530
commitca5bb3716df2bbbc4c20bd2dc4b1ecbb83efd8be (patch)
treeb66917e31f2b96e107a36ba287ae9075279668e2 /main.h
parent95492aad3f18578786411106cf6c4e1f04f9e086 (diff)
macro from WriteDrawText to WriteText (for secondary font) turning on vsync holds the fps menu now
Diffstat (limited to 'main.h')
-rw-r--r--main.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.h b/main.h
index d098203..9bfdc91 100644
--- a/main.h
+++ b/main.h
@@ -1,10 +1,14 @@
#include <string.h>
+#define TEXT_FONT text_font
+
#define WriteDrawText(text, posX, posY, fontSize, color) \
DrawText(text, posX - (MeasureText(text, fontSize) / 2), posY, fontSize, \
color);
-#define WriteDrawTextFont(font, text, posX, posY, fontSize, spacing, color) Vector2 foo = {(posX - MeasureTextEx(font, text, fontSize, spacing).x/2), posY}; DrawTextEx(font, text, foo, fontSize, spacing, color);
+#define WriteDrawTextFont(font, text, posX, posY, fontSize, spacing, color) DrawTextEx(font, text, (Vector2){(posX - MeasureTextEx(font, text, fontSize, spacing).x/2), posY}, fontSize, spacing, color);
+
+#define WriteText(text, posX, posY, fontSize, color) DrawTextEx(TEXT_FONT, text, (Vector2){(posX - MeasureTextEx(TEXT_FONT, text, fontSize, 0).x/2), posY}, fontSize, 0, color);
#define DrawRect(posX,posY,width,height,color) DrawRectangle(posX - width/2, posY, width, height, color);