
Raygui – A easy and straightforward-to-exercise immediate-mode GUI library
raygui is a easy and straightforward-to-exercise immediate-mode-gui library.
raygui
used to be within the muse inspired by Solidarity IMGUI (immediate mode GUI API).
raygui
used to be originated as an auxiliar module for raylib to create easy GUI interfaces the utilization of raylib graphic style (easy colors, unpleasant rectangular shapes, wide borders…).
raygui
is meant for instruments growth; it has already been historic to assemble extra than one printed instruments.
ingredients
- Instantaneous-mode gui, no retained recordsdata
- +25 controls equipped (overall and evolved)
- Extremely fine styling machine for colors, font and metrics
- Standalone utilization mode supported (for other graphic libs)
- Icons enhance, embedding a total 1-bit icons pack
- More than one instruments equipped for raygui growth
raygui controls
overall controls
Mark | Button | LabelButton | Toggle | ToggleGroup | CheckBox
ComboBox | DropdownBox | TextBox | TextBoxMulti | ValueBox | Spinner
Slider | SliderBar | ProgressBar | StatusBar | DummyRec | Grid
container/separator controls
WindowBox | GroupBox | Line | Panel | ScrollPanel
evolved controls
ListView | ColorPicker | MessageBox | TextInputBox
raygui kinds
raygui
comes with a default style robotically loaded at runtime:
Some further kinds are additionally equipped for comfort, comely take a look at kinds directory for exiguous print:
Custom kinds can additionally be created with ease the utilization of rGuiStyler scheme.
Styles would be loaded at runtime the utilization of raygui GuiLoadStyle()
feature. Straightforward and straightforward-to-exercise.
raygui icons
raygui
helps custom icons, by default, a predefined position of icons is equipped inner raygui
as an array of binary recordsdata; it accommodates 256 imaginable icons defined as 16×16 pixels every; every pixel is codified the utilization of 1-bit. The complete dimension of the array is 2048 bytes
.
To exercise any of these icons comely prefix the #iconId# number to any text written inner raygui
controls:
if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ }
It is additionally imaginable to exercise the equipped GuiIconText()
feature to prefix it robotically, the utilization of a clearer identifier (defined in raygui.h
).
if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }
Provided position of icons would be reviewed and custom-made the utilization of rGuiIcons scheme.
raygui enhance instruments
-
rGuiStyler – A easy and straightforward-to-exercise raygui kinds editor.
-
rGuiIcons – A easy and straightforward-to-exercise raygui icons editor.
-
rGuiLayout – A easy and straightforward-to-exercise raygui layouts editor.
building
raygui
is meant to be historic as a portable single-file header-most attention-grabbing library, to be straight away constructed-in into any C/C++ codebase but some users would perhaps well require a shared/dynamic version of the library, as an example, to create bindings:
- Dwelling windows (MinGW, GCC)
reproduction src/raygui.h src/raygui.c
gcc -o src/raygui.dll src/raygui.c -shared -DRAYGUI_IMPLEMENTATION -DBUILD_LIBTYPE_SHARED -static-libgcc -lopengl32 -lgdi32 -lwinmm -Wl,--out-implib,src/librayguidll.a
- Linux (GCC)
mv src/raygui.h src/raygui.c
gcc -o raygui.so src/raygui.c -shared -fpic -DRAYGUI_IMPLEMENTATION -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
- Mac (clang, homebrew installed raylib)
cp src/raygui.h src/raygui.c
brew set up raylib
gcc -o raygui.dynlib src/raygui.c -shared -fpic -DRAYGUI_IMPLEMENTATION -framework OpenGL -lm -lpthread -ldl $(pkg-config --libs --cflags raylib)
license
raygui is licensed below an unmodified zlib/libpng license, which is an OSI-licensed, BSD-fancy license that enables static linking with closed source software. Test LICENSE for further exiguous print.