GUI Buttons
App: apps/gui_buttons/
Demonstrates every Gui button type and the repeater behavior mode. All buttons are shown in a single window.
Run from root
Section titled “Run from root”% ./plume3d gui_buttonsWhat it shows
Section titled “What it shows”- Label buttons (
buttonLabel) — standard clickable text buttons; returnstrueon 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.
Key patterns
Section titled “Key patterns”// 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 + labelif (Gui.buttonSymbolLabel(11, "Add", 17)) Logger.info("Add clicked")
// Repeater mode — fires every frame while heldGui.buttonSetBehavior(1) // 0=default, 1=repeaterif (Gui.buttonLabel("Hold me")) _holdCount = _holdCount + 1Gui.buttonSetBehavior(0) // restore default- Gui —
buttonLabel,buttonColor,buttonSymbol,buttonSymbolLabel,buttonSetBehavior.