Tune values
Sliders, drags, text fields, color editors, and choices.
Immediate-mode controls · Ruby
A headless-friendly UI toolkit that renders into Tessel images and consumes plain event hashes.
gem install twiddle
1.832on■Compose deterministic controls and draw the same UI in a renderer or RBGL window.
Sliders, drags, text fields, color editors, and choices.
Plots, progress bars, collapsing headers, tooltips, and scrolling.
Keyboard, mouse, wheel, modifiers, and logical scaling.
A small first step
Install the gem, then follow the project guide for platform requirements and the full API.
require "tessel"
require "twiddle"
image = Tessel::Image.new(480, 320, fill: "#101827")
ui = Twiddle::Context.new
ui.frame(events: []) do |g|
g.window("Parameters") do
g.slider("speed", 1.0, 0.0..4.0)
end
end
ui.render(image)