diff --git a/styler/styles/default_dark.style b/styles/default_dark.style similarity index 100% rename from styler/styles/default_dark.style rename to styles/default_dark.style diff --git a/styler/styles/default_light.style b/styles/default_light.style similarity index 100% rename from styler/styles/default_light.style rename to styles/default_light.style diff --git a/styler/styles/hello_kitty.style b/styles/hello_kitty.style similarity index 100% rename from styler/styles/hello_kitty.style rename to styles/hello_kitty.style diff --git a/styler/styles/monokai.style b/styles/monokai.style similarity index 100% rename from styler/styles/monokai.style rename to styles/monokai.style diff --git a/styler/styles/obsidian.style b/styles/obsidian.style similarity index 100% rename from styler/styles/obsidian.style rename to styles/obsidian.style diff --git a/styler/styles/solarized.style b/styles/solarized.style similarity index 100% rename from styler/styles/solarized.style rename to styles/solarized.style diff --git a/styler/styles/solarized_light.style b/styles/solarized_light.style similarity index 100% rename from styler/styles/solarized_light.style rename to styles/solarized_light.style diff --git a/styler/styles/zahnrad.style b/styles/zahnrad.style similarity index 100% rename from styler/styles/zahnrad.style rename to styles/zahnrad.style diff --git a/tools/rGuiLayout/SOON.txt b/tools/rGuiLayout/SOON.txt new file mode 100644 index 0000000..e69de29 diff --git a/styler/color_picker.png b/tools/rGuiStyler/color_picker.png similarity index 100% rename from styler/color_picker.png rename to tools/rGuiStyler/color_picker.png diff --git a/styler/color_picker.raw b/tools/rGuiStyler/color_picker.raw similarity index 100% rename from styler/color_picker.raw rename to tools/rGuiStyler/color_picker.raw diff --git a/styler/colorpicker.h b/tools/rGuiStyler/colorpicker.h similarity index 100% rename from styler/colorpicker.h rename to tools/rGuiStyler/colorpicker.h diff --git a/styler/external/tinyfiledialogs.c b/tools/rGuiStyler/external/tinyfiledialogs.c similarity index 100% rename from styler/external/tinyfiledialogs.c rename to tools/rGuiStyler/external/tinyfiledialogs.c diff --git a/styler/external/tinyfiledialogs.h b/tools/rGuiStyler/external/tinyfiledialogs.h similarity index 100% rename from styler/external/tinyfiledialogs.h rename to tools/rGuiStyler/external/tinyfiledialogs.h diff --git a/styler/raygui_styler.c b/tools/rGuiStyler/rguistyler.c similarity index 95% rename from styler/raygui_styler.c rename to tools/rGuiStyler/rguistyler.c index cf85fec..5c48c6e 100644 --- a/styler/raygui_styler.c +++ b/tools/rGuiStyler/rguistyler.c @@ -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);