mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-05 19:08:13 +00:00
Reviewing some examples titles
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib [text] example - text codepoints loading
|
* raylib [text] example - codepoints loading
|
||||||
*
|
*
|
||||||
* Example complexity rating: [★★★☆] 3/4
|
* Example complexity rating: [★★★☆] 3/4
|
||||||
*
|
*
|
||||||
|
@@ -29,7 +29,7 @@ int main(void)
|
|||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [text] example - font filters");
|
InitWindow(screenWidth, screenHeight, "raylib [text] example - font texture filters");
|
||||||
|
|
||||||
const char msg[50] = "Loaded Font";
|
const char msg[50] = "Loaded Font";
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib [text] example - Font loading
|
* raylib [text] example - font loading
|
||||||
*
|
*
|
||||||
* Example complexity rating: [★☆☆☆] 1/4
|
* Example complexity rating: [★☆☆☆] 1/4
|
||||||
*
|
*
|
||||||
|
@@ -33,7 +33,7 @@ int main(void)
|
|||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [text] example - SDF fonts");
|
InitWindow(screenWidth, screenHeight, "raylib [text] example - font SDF loading");
|
||||||
|
|
||||||
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
|
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ int main(void)
|
|||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [text] example - text formatting");
|
InitWindow(screenWidth, screenHeight, "raylib [text] example - text formating");
|
||||||
|
|
||||||
int score = 100020;
|
int score = 100020;
|
||||||
int hiscore = 200450;
|
int hiscore = 200450;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib [text] example - text input box
|
* raylib [text] example - input box
|
||||||
*
|
*
|
||||||
* Example complexity rating: [★★☆☆] 2/4
|
* Example complexity rating: [★★☆☆] 2/4
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib [text] example - sprite fonts loading
|
* raylib [text] example - sprite fonts
|
||||||
*
|
*
|
||||||
* Example complexity rating: [★☆☆☆] 1/4
|
* Example complexity rating: [★☆☆☆] 1/4
|
||||||
*
|
*
|
||||||
|
@@ -17,8 +17,13 @@
|
|||||||
|
|
||||||
#include "raylib.h"
|
#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
|
// Module functions declaration
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// 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);
|
||||||
|
// 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);
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Program main entry point
|
// Program main entry point
|
||||||
@@ -30,7 +35,7 @@ int main(void)
|
|||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [text] example - draw text inside a rectangle");
|
InitWindow(screenWidth, screenHeight, "raylib [text] example - rectangle bounds");
|
||||||
|
|
||||||
const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's \
|
const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's \
|
||||||
a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \
|
a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib [textures] example - draw texture tiled
|
* raylib [textures] example - texture tiled drawing
|
||||||
*
|
*
|
||||||
* Example complexity rating: [★★★☆] 3/4
|
* Example complexity rating: [★★★☆] 3/4
|
||||||
*
|
*
|
||||||
@@ -36,7 +36,7 @@ int main(void)
|
|||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE); // Make the window resizable
|
SetConfigFlags(FLAG_WINDOW_RESIZABLE); // Make the window resizable
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [textures] example - draw texture tiled");
|
InitWindow(screenWidth, screenHeight, "raylib [textures] example - textures tiled drawing");
|
||||||
|
|
||||||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||||
Texture texPattern = LoadTexture("resources/patterns.png");
|
Texture texPattern = LoadTexture("resources/patterns.png");
|
||||||
|
Reference in New Issue
Block a user