Skip to content

GUI Buttons

App: apps/gui_buttons/

Demonstrates every Gui button type and the repeater behavior mode. All buttons are shown in a single window.

Terminal window
% ./plume3d gui_buttons
  • Label buttons (buttonLabel) — standard clickable text buttons; returns true on click.
  • Color buttons (buttonColor) — solid-color rectangles; click to log the color name.
  • Symbol buttons (buttonSymbol) — icon-only buttons using Nuklear symbol constants (e.g. 7 = triangle up, 11 = plus, 12 = minus).
  • Symbol + label (buttonSymbolLabel) — icon combined with a text label.
  • Repeater mode (buttonSetBehavior(1)) — a button held down fires every frame instead of once on press. Toggle with a checkbox to compare.
// Color button (colors 0-255)
if (Gui.buttonColor(220, 50, 50, 255)) Logger.info("Red clicked")
// Symbol button (7 = NK_SYMBOL_TRIANGLE_UP)
if (Gui.buttonSymbol(7)) Logger.info("Up clicked")
// Symbol + label
if (Gui.buttonSymbolLabel(11, "Add", 17)) Logger.info("Add clicked")
// Repeater mode — fires every frame while held
Gui.buttonSetBehavior(1) // 0=default, 1=repeater
if (Gui.buttonLabel("Hold me")) _holdCount = _holdCount + 1
Gui.buttonSetBehavior(0) // restore default
  • GuibuttonLabel, buttonColor, buttonSymbol, buttonSymbolLabel, buttonSetBehavior.