![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Controls and Parameters · Generated API signature Creates a momentary button. Use a button for a momentary action such as triggering a sound. Its value is 1 while pressed and 0 when released. Its range and initial value are built in. Add the control to the model’s Controls collection during setup. Pass Button
klang::ButtonBasic use
controls = { Button("Trigger") };Optional placement and size
Control::Size as the last argument. Its values are x, y, width, and height. Omit it for automatic layout.controls = { Button("Trigger", { 0, 0, 72, 24 }) };