Skip to content

GUI Combo

App: apps/gui_combo/

Demonstrates all three comboBegin* variants: a text-item dropdown, a color-swatch dropdown with an embedded colorPicker, and a symbol (icon) dropdown.

Terminal window
% ./plume3d gui_combo
  • Label combo — standard item list; comboItemLabel returns true on selection.
  • Color combo — opens with a color swatch; embeds a colorPicker inside the dropdown. Colors are 0–255.
  • Symbol combo — opens with a Nuklear symbol icon; items are comboItemSymbolLabel.
// Label combo
if (Gui.comboBeginLabel(_items[_selected], 200, 200)) {
Gui.layoutRowDynamic(25, 1)
for (i in 0..._items.count) {
if (Gui.comboItemLabel(_items[i], 17)) _selected = i
}
Gui.comboEnd()
}
// Color combo with inline picker (colors 0-255)
if (Gui.comboBeginColor(_r, _g, _b, _a, 200, 300)) {
Gui.layoutRowDynamic(120, 1)
var result = Gui.colorPicker(_r, _g, _b, _a, 1) // returns [r,g,b,a] 0-255
_r = result[0]
_g = result[1]
_b = result[2]
Gui.comboEnd()
}
  • GuicomboBeginLabel, comboBeginColor, comboBeginSymbol, comboItemLabel, comboItemSymbolLabel, comboEnd.
  • GuicolorPicker.