diff options
| author | Ray <raysan5@gmail.com> | 2016-06-02 01:24:27 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-06-02 01:24:27 +0200 |
| commit | 7afa0b09ab00b610ad084026022df788fb787229 (patch) | |
| tree | 59aa3e1b79b90f43f1dbe8ea2ae3ef39fb51e997 /src/raygui.h | |
| parent | 0a27525a4ba2ca9f8f6c4e723b50411549d6c558 (diff) | |
| download | raylib-7afa0b09ab00b610ad084026022df788fb787229.tar.gz raylib-7afa0b09ab00b610ad084026022df788fb787229.zip | |
Support raygui as standalone library
Diffstat (limited to 'src/raygui.h')
| -rw-r--r-- | src/raygui.h | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/src/raygui.h b/src/raygui.h index 3951e087..61741254 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -30,46 +30,40 @@ //---------------------------------------------------------------------------------- #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 -#endif -// Vector2 type -typedef struct Vector2 { - float x; - float y; -} Vector2; + // 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; + // 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; + // Rectangle type + typedef struct Rectangle { + int x; + int y; + int width; + int height; + } Rectangle; +#endif // Gui properties enumeration typedef enum GuiProperty { |
