gui.enable
Enable gui controls (global state)
Zigfn enable() voidCvoid GuiEnable(void);Used in shapes_pie_chart, shapes_kaleidoscope, models_animation_blending.
Immediate-mode GUI controls (as @import("raygui")). 61 functions, from raylib's raygui.
Enable gui controls (global state)
Zigfn enable() voidCvoid GuiEnable(void);Used in shapes_pie_chart, shapes_kaleidoscope, models_animation_blending.
Disable gui controls (global state)
Zigfn disable() voidCvoid GuiDisable(void);Used in shapes_pie_chart, shapes_kaleidoscope, models_animation_blending.
Lock gui controls (global state)
Zigfn lock() voidCvoid GuiLock(void);Used in shapes_splines_drawing.
Unlock gui controls (global state)
Zigfn unlock() voidCvoid GuiUnlock(void);Used in shapes_splines_drawing.
Check if gui is locked (global state)
Zigfn isLocked() boolCbool GuiIsLocked(void);Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
Zigfn setAlpha(alpha: f32) voidCvoid GuiSetAlpha(float alpha);Set gui state (global state)
Zigfn setState(state: State) voidCvoid GuiSetState(int state);Used in core_clipboard_text, core_compute_hash.
Get gui state (global state)
Zigfn getState() StateCint GuiGetState(void);Set gui custom font (global state)
Zigfn setFont(font: Font) voidCvoid GuiSetFont(Font font);Get gui custom font (global state)
Zigfn getFont() FontCFont GuiGetFont(void);Set one style property
Zigfn setStyle(control: Control, property: anytype, value: anytype) voidCvoid GuiSetStyle(int control, int property, int value);Used in core_directory_files, core_clipboard_text, core_compute_hash, shapes_math_sine_cosine, shapes_outlines_testbed, models_animation_blending and 1 more.
Get one style property
Zigfn getStyle(control: Control, property: anytype) i32Cint GuiGetStyle(int control, int property);Load style file over global style variable (.rgs)
Zigfn loadStyle(fileName: ?[:0]const u8) voidCvoid GuiLoadStyle(const char *fileName);Load style from memory (binary only)
Zigfn loadStyleFromMemory(fileData: []const u8) voidCvoid GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize);Load style default over global style
Zigfn loadStyleDefault() voidCvoid GuiLoadStyleDefault(void);Enable gui tooltips (global state)
Zigfn enableTooltip() voidCvoid GuiEnableTooltip(void);Disable gui tooltips (global state)
Zigfn disableTooltip() voidCvoid GuiDisableTooltip(void);Set tooltip string
Zigfn setTooltip(tooltip: ?[:0]const u8) voidCvoid GuiSetTooltip(const char *tooltip);Get text with icon id prepended (if supported)
Zigfn iconText(iconId: IconName, text: ?[:0]const u8) [:0]const u8Cconst char *GuiIconText(int iconId, const char *text);Set default icon drawing size
Zigfn setIconScale(scale: i32) voidCvoid GuiSetIconScale(int scale);Used in core_clipboard_text.
Get raygui icons data pointer
Zigfn getIcons() [*]u32Cunsigned int *GuiGetIcons(void);Load raygui icons file (.rgi) into internal icons data
Zigfn loadIcons(fileName: ?[:0]const u8, loadIconsName: bool) ?[*][*:0]u8Cchar **GuiLoadIcons(const char *fileName, bool loadIconsName);Load raygui icons file (.rgi) from memory into internal icons data
Zigfn loadIconsFromMemory(fileData: []const u8, loadIconsName: bool) ?[*][*:0]u8Cchar **GuiLoadIconsFromMemory(const unsigned char *fileData, int dataSize, bool loadIconsName);Draw icon using pixel size at specified position
Zigfn drawIcon(iconId: IconName, posX: i32, posY: i32, pixelSize: i32, color: Color) voidCvoid GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color);Get text width considering gui style and icon size (if required)
Zigfn getTextWidth(text: ?[:0]const u8) i32Cint GuiGetTextWidth(const char *text);Window Box control, shows a window that can be closed
Zigfn windowBox(bounds: Rectangle, title: ?[:0]const u8) i32Cint GuiWindowBox(Rectangle bounds, const char *title);Group Box control with text name
Zigfn groupBox(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiGroupBox(Rectangle bounds, const char *text);Line separator control, could contain text
Zigfn line(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiLine(Rectangle bounds, const char *text);Used in shapes_pie_chart.
Panel control, useful to group controls
Zigfn panel(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiPanel(Rectangle bounds, const char *text);Scroll Panel control
Zigfn scrollPanel(bounds: Rectangle, text: ?[:0]const u8, content: Rectangle, scroll: *Vector2, view: *Rectangle) i32Cint GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view);Used in shapes_pie_chart.
Label control
Zigfn label(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiLabel(Rectangle bounds, const char *text);Used in core_directory_files, core_clipboard_text, core_compute_hash, shapes_splines_drawing, models_animation_blending, models_animation_timing.
Button control, returns true when clicked
Zigfn button(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiButton(Rectangle bounds, const char *text);Used in core_directory_files, core_clipboard_text, core_compute_hash, shapes_kaleidoscope, models_mesh_uv_painting, models_procedural_decals and 2 more.
Label button control, returns true when clicked
Zigfn labelButton(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiLabelButton(Rectangle bounds, const char *text);Toggle Button control
Zigfn toggle(bounds: Rectangle, text: ?[:0]const u8, active: *bool) i32Cint GuiToggle(Rectangle bounds, const char *text, bool *active);Toggle Group control
Zigfn toggleGroup(bounds: Rectangle, text: ?[:0]const u8, active: *i32) i32Cint GuiToggleGroup(Rectangle bounds, const char *text, int *active);Used in shaders_color_correction, shaders_game_of_life.
Toggle Slider control
Zigfn toggleSlider(bounds: Rectangle, text: ?[:0]const u8, active: *i32) i32Cint GuiToggleSlider(Rectangle bounds, const char *text, int *active);Check Box control, returns true when active
Zigfn checkBox(bounds: Rectangle, text: ?[:0]const u8, checked: *bool) i32Cint GuiCheckBox(Rectangle bounds, const char *text, bool *checked);Used in shapes_recursive_tree, shapes_ring_drawing, shapes_rounded_rectangle_drawing, shapes_splines_drawing, shapes_triangle_strip, shapes_pie_chart and 1 more.
Combo Box control
Zigfn comboBox(bounds: Rectangle, text: ?[:0]const u8, active: *i32) i32Cint GuiComboBox(Rectangle bounds, const char *text, int *active);Dropdown Box control
Zigfn dropdownBox(bounds: Rectangle, text: ?[:0]const u8, active: *i32, editMode: bool) i32Cint GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode);Used in shapes_splines_drawing, models_animation_blending, models_animation_timing.
Spinner control
Zigfn spinner(bounds: Rectangle, text: ?[:0]const u8, value: *i32, minValue: i32, maxValue: i32, editMode: bool) i32Cint GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode);Used in shapes_pie_chart, shapes_hilbert_curve.
Value Box control, updates input text with numbers
Zigfn valueBox(bounds: Rectangle, text: ?[:0]const u8, value: *i32, minValue: i32, maxValue: i32, editMode: bool) i32Cint GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode);Value box control for float values
Zigfn valueBoxFloat(bounds: Rectangle, text: ?[:0]const u8, textValue: [*]u8, value: *f32, editMode: bool) i32Cint GuiValueBoxFloat(Rectangle bounds, const char *text, char *textValue, float *value, bool editMode);Text Box control, updates input text
Zigfn textBox(bounds: Rectangle, text: ?[]u8, editMode: bool) i32Cint GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode);Used in core_clipboard_text, core_compute_hash, shapes_pie_chart.
Slider control
Zigfn slider(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32Cint GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue);Used in shapes_hilbert_curve, models_animation_blending, models_animation_timing.
Slider Bar control
Zigfn sliderBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32Cint GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue);Used in shapes_recursive_tree, shapes_ring_drawing, shapes_circle_sector_drawing, shapes_rounded_rectangle_drawing, shapes_splines_drawing, shapes_triangle_strip and 7 more.
Progress Bar control
Zigfn progressBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32Cint GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue);Status Bar control, shows info text
Zigfn statusBar(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiStatusBar(Rectangle bounds, const char *text);Dummy control for placeholders
Zigfn dummyRec(bounds: Rectangle, text: ?[:0]const u8) i32Cint GuiDummyRec(Rectangle bounds, const char *text);Grid control
Zigfn grid(bounds: Rectangle, text: ?[:0]const u8, spacing: f32, subdivs: i32, mouseCell: *Vector2) i32Cint GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell);List View control
Zigfn listView(bounds: Rectangle, text: ?[:0]const u8, scrollIndex: *i32, active: *i32) i32Cint GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active);List View control, using text entries list and returning focus entry
Zigfn listViewEx(bounds: Rectangle, text: []const [*:0]const u8, scrollIndex: *i32, active: *i32, focus: *i32) i32Cint GuiListViewEx(Rectangle bounds, char **text, int count, int *scrollIndex, int *active, int *focus);Used in core_directory_files.
Tab Bar control
Zigfn tabBar(bounds: Rectangle, text: ?[:0]const u8, hscroll: *i32, active: *i32) i32Cint GuiTabBar(Rectangle bounds, const char *text, int *hscroll, int *active);Tab Bar control, using text entries list and returning focus entry
Zigfn tabBarEx(bounds: Rectangle, text: []const [*:0]const u8, hscroll: *i32, active: *i32, focus: *i32) i32Cint GuiTabBarEx(Rectangle bounds, char **text, int count, int *hscroll, int *active, int *focus);Message Box control, displays a message
Zigfn messageBox(bounds: Rectangle, title: ?[:0]const u8, message: ?[:0]const u8, btnText: ?[:0]const u8, btnActive: *i32) i32Cint GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *btnText, int *btnActive);Text Input Box control, ask for text, supports secret
Zigfn textInputBox(bounds: Rectangle, title: ?[:0]const u8, message: ?[:0]const u8, text: ?[]u8, btnText: ?[:0]const u8, btnActive: *i32, secretViewActive: *bool) i32Cint GuiTextInputBox(Rectangle bounds, const char *title, const char *message, char *text, int textSize, const char *btnText, int *btnActive, bool *secretViewActive);Color Picker control, includes Color bar controls
Zigfn colorPicker(bounds: Rectangle, text: ?[:0]const u8, color: *Color) i32Cint GuiColorPicker(Rectangle bounds, const char *text, Color *color);Color Panel control
Zigfn colorPanel(bounds: Rectangle, text: ?[:0]const u8, color: *Color) i32Cint GuiColorPanel(Rectangle bounds, const char *text, Color *color);Color Bar Alpha control
Zigfn colorBarAlpha(bounds: Rectangle, text: ?[:0]const u8, alpha: *f32) i32Cint GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha);Color Bar Hue control
Zigfn colorBarHue(bounds: Rectangle, text: ?[:0]const u8, value: *f32) i32Cint GuiColorBarHue(Rectangle bounds, const char *text, float *value);Color Picker control, using Hue-Saturation-Value color data, includes Color bar controls
Zigfn colorPickerHSV(bounds: Rectangle, text: ?[:0]const u8, colorHsv: *Vector3) i32Cint GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv);Color Panel control, using Hue-Saturation-Value color data
Zigfn colorPanelHSV(bounds: Rectangle, text: ?[:0]const u8, colorHsv: *Vector3) i32Cint GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv);