2022-01-02 19:33:53 +01:00
2019-08-27 13:19:06 +02:00
2021-12-31 20:06:32 +01:00
2021-10-05 12:48:18 +02:00
2019-08-21 12:50:57 +02:00
2021-11-06 15:00:29 +01:00
2022-01-02 19:33:53 +01:00
2021-12-31 11:00:11 +01:00
2016-09-15 12:20:40 +02:00
2020-04-16 13:24:03 +02:00
2019-08-24 21:08:56 +02:00
2021-12-31 20:06:32 +01:00

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 multiple published tools.


features

  • Immediate-mode gui, no retained data
  • +28 basic and advance controls provided
  • Powerful styling system for colors, font and metrics
  • Standalone usage mode supported (for other graphic libs)
  • Icons support, embedding a complete 1-bit icons pack
  • Multiple tools provided for raygui development

raygui controls

basic controls

Label       |  Button      |  LabelButton |  Toggle       |  ToggleGroup |  CheckBox
ComboBox    |  DropdownBox |  TextBox     |  TextBoxMulti |  ValueBox    |  Spinner     |  Slider
SliderBar   |  ProgressBar |  StatusBar   |  ScrollBar    |  ScrollPanel |  DummyRec    |  Grid

advance controls

ListView    |  ColorPicker |  MessageBox  |  TextInputBox

container/separator controls

WindowBox   |  GroupBox    |  Line        |  Panel

raygui styles

raygui comes with a default style automatically loaded at runtime:

raygui default style

Some additional styles are also provided for convenience, just check styles directory for details:

raygui additional styles

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.

raygui icons

raygui supports custom icons, by default, a predefined set of icons is provided inside raygui as an array of binary data; it contains 256 possible icons defined as 16x16 pixels each; each pixel is codified using 1-bit. The total size of the array is 2048 bytes.

To use any of those icons just prefix the #iconId# number to any text written within raygui controls:

if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ }

It's also possible to use the provided GuiIconText() function to prefix it automatically, using a clearer identifier (defined in raygui.h).

if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }

Provided set of icons can be reviewed and customized using rGuiIcons tool.

raygui support tools

  • rGuiStyler - A simple and easy-to-use raygui styles editor.

    rGuiStyler v3.1

  • rGuiIcons - A simple and easy-to-use raygui icons editor.

    rGuiIcons v1.0

  • rGuiLayout - A simple and easy-to-use raygui layouts editor.

    rGuiLayout v2.2

building

raygui is intended to be used as a portable single-file header-only library, to be directly integrated into any C/C++ codebase but some users could require a shared/dynamic version of the library, for example, to create bindings:

  • Windows (MinGW, GCC)
copy 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

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.

Description
A simple and easy-to-use immediate-mode gui library
Readme
Languages
C 99.7%
CMake 0.3%