Support raygui as standalone library
This commit is contained in:
parent
0a27525a4b
commit
7afa0b09ab
1 changed files with 60 additions and 55 deletions
62
src/raygui.h
62
src/raygui.h
|
|
@ -30,47 +30,41 @@
|
|||
//----------------------------------------------------------------------------------
|
||||
#define NUM_PROPERTIES 98
|
||||
|
||||
#define BLANK (Color){ 0, 0, 0, 0 } // Blank (Transparent)
|
||||
|
||||
#define KEY_LEFT 263
|
||||
#define KEY_RIGHT 262
|
||||
|
||||
#define MOUSE_LEFT_BUTTON 0
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Types and Structures Definition
|
||||
// NOTE: Some types are required for RAYGUI_STANDALONE usage
|
||||
//----------------------------------------------------------------------------------
|
||||
#ifndef __cplusplus
|
||||
// Boolean type
|
||||
#ifndef true
|
||||
typedef enum { false, true } bool;
|
||||
#if defined(RAYGUI_STANDALONE)
|
||||
#ifndef __cplusplus
|
||||
// Boolean type
|
||||
#ifndef true
|
||||
typedef enum { false, true } bool;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Vector2 type
|
||||
typedef struct Vector2 {
|
||||
float x;
|
||||
float y;
|
||||
} Vector2;
|
||||
|
||||
// Color type, RGBA (32bit)
|
||||
typedef struct Color {
|
||||
unsigned char r;
|
||||
unsigned char g;
|
||||
unsigned char b;
|
||||
unsigned char a;
|
||||
} Color;
|
||||
|
||||
// Rectangle type
|
||||
typedef struct Rectangle {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} Rectangle;
|
||||
#endif
|
||||
|
||||
// Vector2 type
|
||||
typedef struct Vector2 {
|
||||
float x;
|
||||
float y;
|
||||
} Vector2;
|
||||
|
||||
// Color type, RGBA (32bit)
|
||||
typedef struct Color {
|
||||
unsigned char r;
|
||||
unsigned char g;
|
||||
unsigned char b;
|
||||
unsigned char a;
|
||||
} Color;
|
||||
|
||||
// Rectangle type
|
||||
typedef struct Rectangle {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} Rectangle;
|
||||
|
||||
// Gui properties enumeration
|
||||
typedef enum GuiProperty {
|
||||
GLOBAL_BASE_COLOR = 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue