mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
Review examples to latest raygui
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "raylib.h"
|
||||
|
||||
#define RAYGUI_IMPLEMENTATION
|
||||
#define RAYGUI_SUPPORT_RICONS
|
||||
#include "../../src/raygui.h"
|
||||
|
||||
|
||||
@ -44,6 +45,7 @@ int main(int argc, char *argv[0])
|
||||
int pixelFormatActive = 0;
|
||||
const char *pixelFormatTextList[7] = { "GRAYSCALE", "GRAY ALPHA", "R5G6B5", "R8G8B8", "R5G5B5A1", "R4G4B4A4", "R8G8B8A8" };
|
||||
|
||||
bool textBoxEditMode = false;
|
||||
char fileName[32] = "untitled";
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
@ -168,8 +170,8 @@ int main(int argc, char *argv[0])
|
||||
GuiLabel((Rectangle){ windowBoxRec.x + 10, windowBoxRec.y + 70, 63, 25 }, "Pixel format:");
|
||||
pixelFormatActive = GuiComboBox((Rectangle){ windowBoxRec.x + 80, windowBoxRec.y + 70, 130, 25 }, TextJoin(pixelFormatTextList, 7, ";"), pixelFormatActive);
|
||||
GuiLabel((Rectangle){ windowBoxRec.x + 10, windowBoxRec.y + 105, 50, 25 }, "File name:");
|
||||
GuiTextBox((Rectangle){ windowBoxRec.x + 80, windowBoxRec.y + 105, 130, 25 }, fileName, 64, true);
|
||||
|
||||
if (GuiTextBox((Rectangle){ windowBoxRec.x + 80, windowBoxRec.y + 105, 130, 25 }, fileName, 64, textBoxEditMode)) textBoxEditMode = !textBoxEditMode;
|
||||
|
||||
btnExport = GuiButton((Rectangle){ windowBoxRec.x + 10, windowBoxRec.y + 145, 200, 30 }, "Export Image");
|
||||
}
|
||||
else btnExport = false;
|
||||
|
||||
Reference in New Issue
Block a user