raysan5 / raygui

A simple and easy-to-use immediate-mode gui library
zlib License
3.47k stars 298 forks source link

Make raygui a bit more open #300

Closed furudbat closed 1 year ago

furudbat commented 1 year ago

Hi, I changed the API a bit to use the "private" (static) functions in my other headers. (Add RAYGUIAPI to the "Module specific Functions")

Make Module specific Functions public

I had a problem when using raygui in my custom GUI-Elements Header file, I couldn't use functions like GuiDrawRectangle or the (global) variable guiAlpha. _(This only could work when I use raygui with #define RAYGUI_IMPLEMENTATION, like in the custom_sliders.c example, but my GUI components are split in different header- and cpp-files)_

add more getters

Little Fixes

change clicked to result in the RAYGUI_NO_ICONS case.

#if defined(RAYGUI_NO_ICONS)
    result = GuiButton(closeButtonRec, "x");
#else
    result = GuiButton(closeButtonRec, GuiIconText(ICON_CROSS_SMALL, NULL));
#endif

Cast (void*) to (unsigned char*), got some pedantic C++ errors.

unsigned char *... = (unsigned char *)RAYGUI_MALLOC(...);
raysan5 commented 1 year ago

@furudbat Sorry, no plans to expose those functions and neither add the proposed ones.