Reorganize folders and renames

This commit is contained in:
raysan5
2016-08-27 21:06:06 +02:00
parent 1c4c835c0a
commit b5a573a3c4
15 changed files with 29 additions and 11 deletions

View File

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1,23 +1,38 @@
/*******************************************************************************************
*
* raygui styler - raygui Style Editor
* rGuiStyler - raygui Style Editor
*
* 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
*
*
* 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)
*
* 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"
#define RAYGUI_IMPLEMENTATION
#include "../raygui.h"
#include "raygui.h"
#include "external/tinyfiledialogs.h"
#include "colorpicker.h"
@ -35,7 +50,7 @@
#define NUM_ELEMENTS 13
// 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;
@ -571,11 +586,12 @@ int main()
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);
// -- Import & Save buttons
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 3*rgbWidthLabel - rgbDelta - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Import Style"))
// -- Load and Save buttons
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);
if(fileName == NULL) fileName = "";
if (fileName == NULL) fileName = "";
else
{
guiPropertySelected = -1;
@ -586,9 +602,11 @@ int main()
if (GuiButton((Rectangle){ colorPickerPos.x, screenHeight - 2*rgbWidthLabel - STATUS_BAR_HEIGHT, colorPickerTexture.width, rgbWidthLabel}, "Save Style"))
{
fileName = tinyfd_saveFileDialog( "", "name.style", 0, NULL, NULL);
if(fileName == NULL) fileName = "";
if (fileName == NULL) fileName = "";
else saveStyle = true;
}
//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);