Reviewed examples for latest raygui/raylib

This commit is contained in:
raysan5
2021-10-05 14:10:35 +02:00
parent 0ed765cd8b
commit 7c63e389b8
11 changed files with 73 additions and 52 deletions

View File

@ -3,26 +3,24 @@
* raygui - custom file dialog to load image
*
* DEPENDENCIES:
* raylib 2.6-dev - Windowing/input management and drawing.
* raygui 2.6-dev - Immediate-mode GUI controls.
* raylib 4.0 - Windowing/input management and drawing.
* raygui 3.0 - Immediate-mode GUI controls.
*
* COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
*
* LICENSE: zlib/libpng
*
* Copyright (c) 2020 Ramon Santamaria (@raysan5)
* Copyright (c) 2016-2021 Ramon Santamaria (@raysan5)
*
**********************************************************************************************/
#include "raylib.h"
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "../../src/raygui.h"
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again
#define GUI_FILE_DIALOG_IMPLEMENTATION
#include "gui_file_dialog.h"

View File

@ -18,7 +18,7 @@
*
* LICENSE: zlib/libpng
*
* Copyright (c) 2019-2020 Ramon Santamaria (@raysan5)
* Copyright (c) 2019-2021 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
@ -257,7 +257,7 @@ void GuiFileDialog(GuiFileDialogState *state)
//------------------------------------------------------------------------------------
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)), 0.85f));
state->fileDialogActive = !GuiWindowBox((Rectangle){ state->position.x + 0, state->position.y + 0, winWidth, winHeight }, "#198#LuaJIT | Select File Dialog");
state->fileDialogActive = !GuiWindowBox((Rectangle){ state->position.x + 0, state->position.y + 0, winWidth, winHeight }, "#198# Select File Dialog");
if (GuiButton((Rectangle){ state->position.x + winWidth - 50, state->position.y + 35, 40, 25 }, "< ..")) // || IsKeyReleased(KEY_DPAD_Y))
{