rename Font into RLFont

prevent conflict with Xlib.h
This commit is contained in:
SergeyMC9730 2024-03-07 22:51:20 +08:00
commit 19cd976000

View file

@ -15,8 +15,8 @@
#include "raylib.h"
static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
static void DrawTextBoxed(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
static void DrawTextBoxedSelectable(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
//------------------------------------------------------------------------------------
// Program main entry point
@ -48,7 +48,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
Vector2 lastMouse = { 0.0f, 0.0f }; // Stores last mouse coordinates
Color borderColor = MAROON; // Container border color
Font font = GetFontDefault(); // Get default system font
RLFont font = GetFontDefault(); // Get default system font
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -132,13 +132,13 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
//--------------------------------------------------------------------------------------
// Draw text using font inside rectangle limits
static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
static void DrawTextBoxed(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
{
DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE);
}
// Draw text using font inside rectangle limits with support for text selection
static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
static void DrawTextBoxedSelectable(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
{
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop