Raygui – A easy and straightforward-to-exercise immediate-mode GUI library

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.


  • 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:

raygui default style

Some further kinds are additionally equipped for comfort, comely take a look at kinds directory for exiguous print:

raygui additional styles

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.

    rGuiStyler v3.1

  • rGuiIcons – A easy and straightforward-to-exercise raygui icons editor.

    rGuiIcons v1.0

  • rGuiLayout – A easy and straightforward-to-exercise raygui layouts editor.

    rGuiLayout v2.2


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)


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.

Read More

Related Articles

x86 Is an Octal Machine

# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt From: mark@omnifest.uwm.edu (Mark Hopkins) Newsgroups: alt.lang.asm Subject: A Summary of the 80486 Opcodes and Instructions (1) The 80×86 is an Octal Machine This is a follow-up and revision of an article posted in alt.lang.asm on 7-5-92 concerning the 80×86 instruction encoding. The only proper way to understand 80×86 coding is to realize that…

Windows 11 Guide

A guide on setting up your Windows 11 Desktop with all the essential Applications, Tools, and Games to make your experience with Windows 11 great! Note: You can easily convert this markdown file to a PDF in VSCode using this handy extension Markdown PDF. Getting Started Windows 11 Desktop Bypass Windows 11’s TPM, CPU and…

What’s recent in Emacs 28.1?

By Mickey Petersen It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes.Notable features include the formal inclusion of native compilation, a technique that will greatly speed up your Emacs experience.A critical issue surrounding the use of ligatures also fixed; without it, you…