diff --git a/examples/models/models_procedural_decals.c b/examples/models/models_procedural_decals.c index 692da7bc7..ee636acff 100644 --- a/examples/models/models_procedural_decals.c +++ b/examples/models/models_procedural_decals.c @@ -24,6 +24,8 @@ ********************************************************************************************/ #include "raylib.h" +#define RAYGUI_IMPLEMENTATION +#include "raygui.h" #include "raymath.h" #include // Required for: NULL @@ -55,7 +57,6 @@ static void FreeMeshBuilder(MeshBuilder *mb); static Mesh BuildMesh(MeshBuilder *mb); static Vector3 ClipSegment(Vector3 v0, Vector3 v1, Vector3 p, float s); static Mesh GenMeshDecal(Model model, Matrix projection, float decalSize, float decalOffset); -static bool GuiButton(Rectangle rec, const char *label); //------------------------------------------------------------------------------------ // Program main entry point @@ -501,19 +502,3 @@ static Mesh GenMeshDecal(Model model, Matrix projection, float decalSize, float return decalMesh; } - -// Minimal toggle-style GUI button -static bool GuiButton(Rectangle rec, const char *label) -{ - bool hovered = CheckCollisionPointRec(GetMousePosition(), rec); - bool pressed = hovered && IsMouseButtonPressed(MOUSE_BUTTON_LEFT); - - DrawRectangleRec(rec, hovered ? LIGHTGRAY : GRAY); - DrawRectangleLinesEx(rec, 2.0f, DARKGRAY); - - int fontSize = 10; - int textWidth = MeasureText(label, fontSize); - DrawText(label, (int)(rec.x + rec.width*0.5f - textWidth*0.5f), (int)(rec.y + rec.height*0.5f - fontSize*0.5f), fontSize, DARKGRAY); - - return pressed; -}