Update raygui.h

This commit is contained in:
Ray 2022-06-03 11:48:39 +02:00
parent c29da799cc
commit 5bcfa6ccdc

View File

@ -378,6 +378,7 @@ typedef enum {
// Gui extended properties depend on control // Gui extended properties depend on control
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties) // NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties)
//----------------------------------------------------------------------------------
// DEFAULT extended properties // DEFAULT extended properties
// NOTE: Those properties are common to all controls or global // NOTE: Those properties are common to all controls or global
@ -850,15 +851,16 @@ typedef enum {
#if !defined(RAYGUI_NO_ICONS) && !defined(RAYGUI_CUSTOM_ICONS) #if !defined(RAYGUI_NO_ICONS) && !defined(RAYGUI_CUSTOM_ICONS)
// Embedded raygui icons, no external file provided // Embedded icons, no external file provided
#define RAYGUI_ICON_SIZE 16 // Size of icons (squared) #define RAYGUI_ICON_SIZE 16 // Size of icons in pixels (squared)
#define RAYGUI_ICON_MAX_ICONS 256 // Maximum number of icons #define RAYGUI_ICON_MAX_ICONS 256 // Maximum number of icons
#define RAYGUI_ICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id #define RAYGUI_ICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
// Icons data is defined by bit array (every bit represents one pixel) // Icons data is defined by bit array (every bit represents one pixel)
// Those arrays are stored as unsigned int data arrays, so every array // Those arrays are stored as unsigned int data arrays, so,
// element defines 32 pixels (bits) of information // every array element defines 32 pixels (bits) of information
// Number of elemens depend on RAYGUI_ICON_SIZE (by default 16x16 pixels) // One icon is defined by 8 int, (8 int * 32 bit = 256 bit = 16*16 pixels)
// NOTE: Number of elemens depend on RAYGUI_ICON_SIZE (by default 16x16 pixels)
#define RAYGUI_ICON_DATA_ELEMENTS (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32) #define RAYGUI_ICON_DATA_ELEMENTS (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -1150,7 +1152,7 @@ typedef enum { BORDER = 0, BASE, TEXT, OTHER } GuiPropertyElement;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Global Variables Definition // Global Variables Definition
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
static GuiState guiState = STATE_NORMAL; static GuiState guiState = STATE_NORMAL; // Gui global state, if !STATE_NORMAL, forces defined state
static Font guiFont = { 0 }; // Gui current font (WARNING: highly coupled to raylib) static Font guiFont = { 0 }; // Gui current font (WARNING: highly coupled to raylib)
static bool guiLocked = false; // Gui lock state (no inputs processed) static bool guiLocked = false; // Gui lock state (no inputs processed)