From 72f9950ce903f98357dd76ec469c2d3a85f447d2 Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Wed, 26 Sep 2018 15:06:03 +0100 Subject: [PATCH 1/2] Forgot to include dropOpen reset Reset dropOpen when dropdown closed. Forgot to add in previous commit --- src/raygui.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raygui.h b/src/raygui.h index 0a961e0..924f307 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -1659,6 +1659,7 @@ RAYGUIDEF int GuiDropdownBox(Rectangle bounds, const char **text, int count, int { if (CheckCollisionPointRec(mousePoint, (Rectangle){ bounds.x, bounds.y + i*bounds.height, bounds.width, bounds.height })) active = i - 1; } + dropOpen = false; } } //-------------------------------------------------------------------- From f43a7bdddf1eaf304bafe80e9937194eaafff26c Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Wed, 26 Sep 2018 15:19:54 +0100 Subject: [PATCH 2/2] Added dllexport to help with binding the library - Added __declspec(dllexport) when compiled as c without RAYGUI_STATIC defined to test. Not sure if there is a better way but it works for what I need. --- src/raygui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 924f307..8ca9a95 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -108,14 +108,14 @@ #include "raylib.h" #endif -#define RAYGUI_STATIC +// #define RAYGUI_STATIC #ifdef RAYGUI_STATIC #define RAYGUIDEF static // Functions just visible to module including this file #else #ifdef __cplusplus #define RAYGUIDEF extern "C" // Functions visible from other files (no name mangling of functions in C++) #else - #define RAYGUIDEF extern // Functions visible from other files + #define RAYGUIDEF __declspec(dllexport) extern // Functions visible from other files #endif #endif