moving guiIconName enum out of #ifdef RAYGUI_IMPLEMENTATION to fix compilation errors

This commit is contained in:
Neolisk 2022-05-11 22:54:29 -07:00
parent dcb0e62095
commit 5bfe6e22e5

View File

@ -554,45 +554,6 @@ RAYGUIAPI bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pi
#endif // RAYGUI_H #endif // RAYGUI_H
/***********************************************************************************
*
* RAYGUI IMPLEMENTATION
*
************************************************************************************/
#if defined(RAYGUI_IMPLEMENTATION)
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
#include <stdlib.h> // Required for: malloc(), calloc(), free() [GuiLoadStyle(), GuiLoadIcons()]
#include <string.h> // Required for: strlen() [GuiTextBox(), GuiTextBoxMulti(), GuiValueBox()], memset(), memcpy()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end() [TextFormat()]
#include <math.h> // Required for: roundf() [GuiColorPicker()]
#ifdef __cplusplus
#define RAYGUI_CLITERAL(name) name
#else
#define RAYGUI_CLITERAL(name) (name)
#endif
#if !defined(RAYGUI_NO_RICONS)
#if defined(RAYGUI_CUSTOM_RICONS)
#define RICONS_IMPLEMENTATION
#include "ricons.h" // External icons data provided, it can be generated with rGuiIcons tool
#else // Embedded raygui icons, no external file provided
#define RICON_SIZE 16 // Size of icons (squared)
#define RICON_MAX_ICONS 256 // Maximum number of icons
#define RICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
// Icons data is defined by bit array (every bit represents one pixel)
// Those arrays are stored as unsigned int data arrays, so every array
// element defines 32 pixels (bits) of information
// Number of elemens depend on RICON_SIZE (by default 16x16 pixels)
#define RICON_DATA_ELEMENTS (RICON_SIZE*RICON_SIZE/32)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Icons enumeration // Icons enumeration
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -855,6 +816,45 @@ typedef enum {
RICON_255 = 255, RICON_255 = 255,
} guiIconName; } guiIconName;
/***********************************************************************************
*
* RAYGUI IMPLEMENTATION
*
************************************************************************************/
#if defined(RAYGUI_IMPLEMENTATION)
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
#include <stdlib.h> // Required for: malloc(), calloc(), free() [GuiLoadStyle(), GuiLoadIcons()]
#include <string.h> // Required for: strlen() [GuiTextBox(), GuiTextBoxMulti(), GuiValueBox()], memset(), memcpy()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end() [TextFormat()]
#include <math.h> // Required for: roundf() [GuiColorPicker()]
#ifdef __cplusplus
#define RAYGUI_CLITERAL(name) name
#else
#define RAYGUI_CLITERAL(name) (name)
#endif
#if !defined(RAYGUI_NO_RICONS)
#if defined(RAYGUI_CUSTOM_RICONS)
#define RICONS_IMPLEMENTATION
#include "ricons.h" // External icons data provided, it can be generated with rGuiIcons tool
#else // Embedded raygui icons, no external file provided
#define RICON_SIZE 16 // Size of icons (squared)
#define RICON_MAX_ICONS 256 // Maximum number of icons
#define RICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
// Icons data is defined by bit array (every bit represents one pixel)
// Those arrays are stored as unsigned int data arrays, so every array
// element defines 32 pixels (bits) of information
// Number of elemens depend on RICON_SIZE (by default 16x16 pixels)
#define RICON_DATA_ELEMENTS (RICON_SIZE*RICON_SIZE/32)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Icons data for all gui possible icons (allocated on data segment by default) // Icons data for all gui possible icons (allocated on data segment by default)
// //