Knowasiak
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.

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:

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

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.

Read More

About the author: Vanic
“Simplicity, patience, compassion. These three are your greatest treasures. Simple in actions and thoughts, you return to the source of being. Patient with both friends and enemies, you accord with the way things are. Compassionate toward yourself, you reconcile all beings in the world.” ― Lao Tzu, Tao Te Ching

Get involved!

Get Connected!
One of the Biggest Social Platform for Entrepreneurs, College Students and all. Come and join our community. Expand your network and get to know new people!

Discussion(s)

No comments yet
Knowasiak We would like to show you notifications so you don't miss chats & status updates.
Dismiss
Allow Notifications