mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-01 11:49:18 -05:00
Reorganize folders and renames
This commit is contained in:
0
tools/rGuiLayout/SOON.txt
Normal file
0
tools/rGuiLayout/SOON.txt
Normal file
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@ -1,23 +1,38 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raygui styler - raygui Style Editor
|
* rGuiStyler - raygui Style Editor
|
||||||
*
|
*
|
||||||
* Compile this program using:
|
* Compile this program using:
|
||||||
* gcc -o $(NAME_PART).exe $(FILE_NAME) external/tinyfiledialogs.c \
|
* gcc -o $(NAME_PART).exe $(FILE_NAME) external/tinyfiledialogs.c -I..\.. \
|
||||||
* -lraylib -lglfw3 -lopengl32 -lgdi32 -lcomdlg32 -lole32 -std=c99 -Wall
|
* -lraylib -lglfw3 -lopengl32 -lgdi32 -lcomdlg32 -lole32 -std=c99 -Wall
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This example has been created using raylib v1.5 (www.raylib.com)
|
* This program has been created using raylib v1.5 (www.raylib.com)
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Sergio Martinez and Ramon Santamaria
|
* Copyright (c) 2014-2016 Sergio Martinez and Ramon Santamaria
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
* 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.
|
||||||
|
*
|
||||||
|
* Permission is granted to anyone to use this software for any purpose, including commercial
|
||||||
|
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||||
|
*
|
||||||
|
* 1. The origin of this software must not be misrepresented; you must not claim that you
|
||||||
|
* wrote the original software. If you use this software in a product, an acknowledgment
|
||||||
|
* in the product documentation would be appreciated but is not required.
|
||||||
|
*
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
||||||
|
* as being the original software.
|
||||||
|
*
|
||||||
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*
|
||||||
|
**********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#define RAYGUI_IMPLEMENTATION
|
#define RAYGUI_IMPLEMENTATION
|
||||||
#include "../raygui.h"
|
#include "raygui.h"
|
||||||
|
|
||||||
#include "external/tinyfiledialogs.h"
|
#include "external/tinyfiledialogs.h"
|
||||||
#include "colorpicker.h"
|
#include "colorpicker.h"
|
||||||
@ -35,7 +50,7 @@
|
|||||||
#define NUM_ELEMENTS 13
|
#define NUM_ELEMENTS 13
|
||||||
|
|
||||||
// NOTE: Be extremely careful when defining: NUM_ELEMENTS, GuiElement, guiElementText, guiPropertyNum, guiPropertyType and guiPropertyPos
|
// NOTE: Be extremely careful when defining: NUM_ELEMENTS, GuiElement, guiElementText, guiPropertyNum, guiPropertyType and guiPropertyPos
|
||||||
// All those variables must be coherent, one small mistake breaks the program (and it could take ours to find the error!)
|
// All those variables must be coherent, one small mistake breaks the program (and it could take hours to find the error!)
|
||||||
|
|
||||||
typedef enum { GLOBAL, BACKGROUND, LABEL, BUTTON, TOGGLE, TOGGLEGROUP, SLIDER, SLIDERBAR, PROGRESSBAR, SPINNER, COMBOBOX, CHECKBOX, TEXTBOX } GuiElement;
|
typedef enum { GLOBAL, BACKGROUND, LABEL, BUTTON, TOGGLE, TOGGLEGROUP, SLIDER, SLIDERBAR, PROGRESSBAR, SPINNER, COMBOBOX, CHECKBOX, TEXTBOX } GuiElement;
|
||||||
|
|
||||||
@ -571,11 +586,12 @@ int main()
|
|||||||
GuiLabel((Rectangle){ colorPickerPos.x + 2*rgbDelta, colorPickerPos.y + colorPickerTexture.height + 10*rgbHeightLabel, rgbWidthLabel, rgbWidthLabel}, "Value");
|
GuiLabel((Rectangle){ colorPickerPos.x + 2*rgbDelta, colorPickerPos.y + colorPickerTexture.height + 10*rgbHeightLabel, rgbWidthLabel, rgbWidthLabel}, "Value");
|
||||||
sizeValueSelected = GuiSpinner((Rectangle){ colorPickerPos.x + 2*rgbWidthLabel, colorPickerPos.y + colorPickerTexture.height + 10*rgbHeightLabel, colorPickerTexture.height - 2*rgbWidthLabel, rgbWidthLabel}, sizeValueSelected, 0, 50);
|
sizeValueSelected = GuiSpinner((Rectangle){ colorPickerPos.x + 2*rgbWidthLabel, colorPickerPos.y + colorPickerTexture.height + 10*rgbHeightLabel, colorPickerTexture.height - 2*rgbWidthLabel, rgbWidthLabel}, sizeValueSelected, 0, 50);
|
||||||
|
|
||||||
// -- Import & Save buttons
|
// -- Load and Save buttons
|
||||||
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 3*rgbWidthLabel - rgbDelta - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Import Style"))
|
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 3*rgbWidthLabel - rgbDelta - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Load Style"))
|
||||||
{
|
{
|
||||||
fileName = tinyfd_openFileDialog( "", "name.style", 0, NULL, NULL, 0);
|
fileName = tinyfd_openFileDialog( "", "name.style", 0, NULL, NULL, 0);
|
||||||
if(fileName == NULL) fileName = "";
|
|
||||||
|
if (fileName == NULL) fileName = "";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
guiPropertySelected = -1;
|
guiPropertySelected = -1;
|
||||||
@ -586,9 +602,11 @@ int main()
|
|||||||
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Save Style"))
|
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Save Style"))
|
||||||
{
|
{
|
||||||
fileName = tinyfd_saveFileDialog( "", "name.style", 0, NULL, NULL);
|
fileName = tinyfd_saveFileDialog( "", "name.style", 0, NULL, NULL);
|
||||||
if(fileName == NULL) fileName = "";
|
|
||||||
|
if (fileName == NULL) fileName = "";
|
||||||
else saveStyle = true;
|
else saveStyle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GuiLabel((Rectangle){colorPickerPos.x, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT + rgbDelta, 2*rgbWidthLabel, rgbWidthLabel}, "File name");
|
//GuiLabel((Rectangle){colorPickerPos.x, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT + rgbDelta, 2*rgbWidthLabel, rgbWidthLabel}, "File name");
|
||||||
//fileName = GuiTextBox((Rectangle){colorPickerPos.x + 2*rgbWidthLabel, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT + rgbDelta, colorPickerTexture.width - 2*rgbWidthLabel, rgbWidthLabel}, fileName);
|
//fileName = GuiTextBox((Rectangle){colorPickerPos.x + 2*rgbWidthLabel, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT + rgbDelta, colorPickerTexture.width - 2*rgbWidthLabel, rgbWidthLabel}, fileName);
|
||||||
|
|
||||||
Reference in New Issue
Block a user