From 4987d385c978f7acbbed6feeb18ad74a48ec5c2f Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 5 Jan 2018 13:27:09 +0100 Subject: [PATCH] Updated to latest raygui --- examples/raw_importer/raw_importer.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/examples/raw_importer/raw_importer.c b/examples/raw_importer/raw_importer.c index cf3cf5c..7b3c472 100644 --- a/examples/raw_importer/raw_importer.c +++ b/examples/raw_importer/raw_importer.c @@ -12,14 +12,16 @@ #include "raylib.h" #define RAYGUI_IMPLEMENTATION +#define RAYGUI_STYLE_SAVE_LOAD #include "raygui.h" #include // Required for: strcpy() #include // Required for: atoi() -char *GetFileName(char *path); // Get pointer to filename data in the string -void GuiPanel(Rectangle bounds, const char *text); // Draw a lines panel with name +//------------------------------------------------------------------------------------ +// Program main entry point +//------------------------------------------------------------------------------------ int main(int argc, char *argv[0]) { // Initialization @@ -54,7 +56,7 @@ int main(int argc, char *argv[0]) int format = UNCOMPRESSED_R8G8B8A8; int headerSize = 0; - LoadGuiStyleImage("rguistyle_default_dark.png"); + GuiLoadStyleImage("rguistyle_default_dark.png"); InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "raw image importer"); @@ -192,8 +194,8 @@ int main(int argc, char *argv[0]) GuiLabel((Rectangle){ panel.x + 20, panel.y + 170, 0, 0 }, "Channels:"); GuiLabel((Rectangle){ panel.x + 20, panel.y + 215, 0, 0 }, "Bit Depth:"); - buttonToggleChannel = GuiToggleGroup((Rectangle){ panel.x + 20, panel.y + 185, 38, 20 }, 4, arrayChannel, buttonToggleChannel); - buttonToggleDepth = GuiToggleGroup((Rectangle){ panel.x + 20, panel.y + 230, 51, 20 }, 3, arrayDepth, buttonToggleDepth); + buttonToggleChannel = GuiToggleGroup((Rectangle){ panel.x + 20, panel.y + 185, 38, 20 }, arrayChannel, 4, buttonToggleChannel); + buttonToggleDepth = GuiToggleGroup((Rectangle){ panel.x + 20, panel.y + 230, 51, 20 }, arrayDepth, 3, buttonToggleDepth); // ----- Header panel ----- GuiGroupBox((Rectangle){ panel.x + 10, panel.y + 285, 180, 50 }, "Header"); @@ -218,12 +220,4 @@ int main(int argc, char *argv[0]) //-------------------------------------------------------------------------------------- return 0; -} - -// Get pointer to filename data in the string -char *GetFileName(char *path) -{ - char *base = strrchr(path, '\\'); - - return base ? base + 1 : path; } \ No newline at end of file