custom immediate mode gui library for raylib, bugs included
because raygui sucks
download src/ig.h, put it into your projects src folder, #define IG_IMPLEMENTATION, #include "ig.h"
-
void ig_init(): initialize internal context and stylecall before main loop
-
void ig_free(): de-initialize internal context and stylecall after main loop
-
void ig_strap(): calculate z-orderscall in main loop, before defining all windows
-
void ig_render(): blit all windows to screencall in main loop, after defining all windows
-
void ig_begin_window(const char* title, int flags, Rectangle rect): define a new windowtitle is a string that's displayed in the window topbar
flags can be IG_RESIZABLE, IG_MOVABLE, IG_TOPBAR or any combination of those with a pipe
rect is a starting position and size of the window
call in main loop, before rendering
-
void ig_end_window(): end a windowcall in main loop, after begining a window
-
bool ig_button(const char* title, bool* held_down): draw a buttontitle is a text displayed on the button
held_down is a bool ptr, that is set when the button is held
returns true on a click
call in main loop, between begining and ending a window
-
void ig_label(const char* title): draw a texttitle is a text that is drawn (duh)
call in main loop, between begining and ending a window
-
bool ig_radio(const char* text, int value, int *store): draw a radio buttontitle is a text displayed on the radio button
value is a value that will be stored in store ptr
returns true on a click
call in main loop, between begining and ending a window
-
bool ig_checkbox(const char* text, bool* store): draw a checkboxtitle is a text displayed on the radio button
store is a bool-ptr, which value is flipped on click
returns true on a click
call in main loop, between begining and ending a window
see src/demo.c for an example