Review formating and added functions

This commit is contained in:
raysan5
2016-08-29 20:48:08 +02:00
parent b5a573a3c4
commit 5712918588

View File

@ -104,7 +104,7 @@
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
#define NUM_PROPERTIES 98 #define NUM_PROPERTIES 99
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Types and Structures Definition // Types and Structures Definition
@ -149,6 +149,7 @@ typedef enum GuiProperty {
GLOBAL_TEXT_FONTSIZE, GLOBAL_TEXT_FONTSIZE,
GLOBAL_BORDER_WIDTH, GLOBAL_BORDER_WIDTH,
BACKGROUND_COLOR, BACKGROUND_COLOR,
LINES_COLOR,
LABEL_BORDER_WIDTH, LABEL_BORDER_WIDTH,
LABEL_TEXT_COLOR, LABEL_TEXT_COLOR,
LABEL_TEXT_PADDING, LABEL_TEXT_PADDING,
@ -251,7 +252,8 @@ typedef enum GuiProperty {
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Module Functions Declaration // Module Functions Declaration
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
RAYGUIDEF Color GuiBackground(void); // Get GUI background color RAYGUIDEF Color GuiBackgroundColor(void); // Get background color
RAYGUIDEF Color GuiLinesColor(void); // Get lines color
RAYGUIDEF void GuiLabel(Rectangle bounds, const char *text); // Label element, show text RAYGUIDEF void GuiLabel(Rectangle bounds, const char *text); // Label element, show text
RAYGUIDEF void GuiLabelEx(Rectangle bounds, const char *text, Color textColor, Color border, Color inner); // Label element extended, configurable colors RAYGUIDEF void GuiLabelEx(Rectangle bounds, const char *text, Color textColor, Color border, Color inner); // Label element extended, configurable colors
RAYGUIDEF bool GuiButton(Rectangle bounds, const char *text); // Button element, returns true when clicked RAYGUIDEF bool GuiButton(Rectangle bounds, const char *text); // Button element, returns true when clicked
@ -338,6 +340,7 @@ static int style[NUM_PROPERTIES] = {
10, // GLOBAL_TEXT_FONTSIZE 10, // GLOBAL_TEXT_FONTSIZE
1, // GLOBAL_BORDER_WIDTH 1, // GLOBAL_BORDER_WIDTH
0xf5f5f5ff, // BACKGROUND_COLOR 0xf5f5f5ff, // BACKGROUND_COLOR
0x90abb5ff, // LINES_COLOR
1, // LABEL_BORDER_WIDTH 1, // LABEL_BORDER_WIDTH
0x4d4d4dff, // LABEL_TEXT_COLOR 0x4d4d4dff, // LABEL_TEXT_COLOR
20, // LABEL_TEXT_PADDING 20, // LABEL_TEXT_PADDING
@ -440,6 +443,7 @@ static int style[NUM_PROPERTIES] = {
0xa, // GLOBAL_TEXT_FONTSIZE 0xa, // GLOBAL_TEXT_FONTSIZE
0x1, // GLOBAL_BORDER_WIDTH 0x1, // GLOBAL_BORDER_WIDTH
0x293235ff, // BACKGROUND_COLOR 0x293235ff, // BACKGROUND_COLOR
0x90abb5ff, // LINES_COLOR
0x0, // LABEL_BORDER_WIDTH 0x0, // LABEL_BORDER_WIDTH
0x90acb4ff, // LABEL_TEXT_COLOR 0x90acb4ff, // LABEL_TEXT_COLOR
0x0, // LABEL_TEXT_PADDING 0x0, // LABEL_TEXT_PADDING
@ -544,6 +548,7 @@ static const char *guiPropertyName[] = {
"GLOBAL_TEXT_FONTSIZE", "GLOBAL_TEXT_FONTSIZE",
"GLOBAL_BORDER_WIDTH", "GLOBAL_BORDER_WIDTH",
"BACKGROUND_COLOR", "BACKGROUND_COLOR",
"LINES_COLOR",
"LABEL_BORDER_WIDTH", "LABEL_BORDER_WIDTH",
"LABEL_TEXT_COLOR", "LABEL_TEXT_COLOR",
"LABEL_TEXT_PADDING", "LABEL_TEXT_PADDING",
@ -674,7 +679,11 @@ static void DrawRectangle(int posX, int posY, int width, int height, Color color
// Module Functions Definition // Module Functions Definition
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
RAYGUIDEF Color GuiBackground(void) { return GetColor(style[BACKGROUND_COLOR]); } // Get background color
RAYGUIDEF Color GuiBackgroundColor(void) { return GetColor(style[BACKGROUND_COLOR]); }
// Get lines color
RAYGUIDEF Color GuiLinesColor(void) { return GetColor(style[LINES_COLOR]); }
// Label element, show text // Label element, show text
RAYGUIDEF void GuiLabel(Rectangle bounds, const char *text) RAYGUIDEF void GuiLabel(Rectangle bounds, const char *text)