From a7d048ca4753c831c482e116f03e0711f86e1a18 Mon Sep 17 00:00:00 2001 From: veradec Date: Wed, 21 Oct 2026 21:12:15 +0530 Subject: Macros for Writing with a font; Changed the title officially to Leet --- main.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.h') diff --git a/main.h b/main.h index 7813dfd..5956f49 100644 --- a/main.h +++ b/main.h @@ -1,6 +1,10 @@ #include -#define WriteDrawText(text, posX, posY, fontSize, color) DrawText(text, posX - (MeasureText(text, fontSize)/2), posY, fontSize, color); +#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 DrawRect(posX,posY,width,height,color) DrawRectangle(posX - width/2, posY, width, height, color); @@ -20,3 +24,5 @@ typedef enum ScreenType { void MainMenu(); void SettingsMenu(); void LoadConfiguration(); + + -- cgit v1.2.3