Modify gui_textbox_extended.h to contain DrawTextRec and DrawTextRecEx since they were cut from raylib, also add DrawTextBoxedSelectable as an alias for DrawTextRecEx for compatibility/name consistency Modify gui_textbox_extended.h to be compatible with the latest raylib
raygui is a simple and easy-to-use immediate-mode-gui library.
raygui was initially inspired by Unity IMGUI (immediate mode GUI API).
raygui was originated as an auxiliar module for raylib to create simple GUI interfaces using raylib graphic style (simple colors, plain rectangular shapes, wide borders...).
raygui is intended for tools development; it has already been used to develop the following tools: rFXGen, rTexViewer, rTexPacker rGuiStyler, rGuiLayout and rGuiIcons
raygui provided controls
Container/separator controls
WindowBox | GroupBox | Line | Panel
Basic controls
Label | Button | LabelButton | ImageButton | Toggle | ToggleGroup | CheckBox
ComboBox | DropdownBox | TextBox | TextBoxMulti | ValueBox | Spinner | Slider
SliderBar | ProgressBar | StatusBar | ScrollBar | ScrollPanel | DummyRec | Grid
Advance controls
ListView | ColorPicker | MessageBox | TextInputBox
raygui styles
raygui comes with a default style automatically loaded at runtime:
Some additional styles are also provided for convenience, just check styles directory for details:
Custom styles can also be created very easily using rGuiStyler tool.
Styles can be loaded at runtime using raygui GuiLoadStyle()
function. Simple and easy-to-use.
rGuiStyler v3.1 - raygui styles editor, useful to create custom styles
raygui icons
raygui
supports custom icons provided as an external array of data. To support icons just define RAYGUI_SUPPORT_RICONS
before including raygui
.
A set of custom handcrafted icons is provided in ricons
. This set of icons can be created and customized using rGuiIcons tool.
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "raygui.h"
To use any of those icons in your gui, just preprend iconId to any text written within raygui
controls:
if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ }
or use the provided GuiIconText()
function to prepend it automatically, using a clearer identifier.
if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }
building as shared library
raygui
is intended to be used as a portable library to be integrated in code form into the target project but some users could require a shared/dynamic version of the library, for example, to create bindings. In that case, raygui
can be built as a shared library using:
mv src/raygui.h src/raygui.c && gcc -shared -fpic -DRAYGUI_SUPPORT_RICONS -DRAYGUI_IMPLEMENTATION -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 src/raygui.c -o raygui.so
license
raygui is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.