lvgui: Allow setting style from `add_button` helper
module LVGUI
# Helper methods to help creating a "button palette" kind of window.
module ButtonPalette
- def add_button(label)
+ def add_button(label, style: nil)
Button.new(@container).tap do |btn|
add_to_focus_group(btn)
btn.glue_obj(true)
@@ -14,6 +14,9 @@ module LVGUI
yield
end
end
+ if style
+ Button::StyleMods.send(style, btn)
+ end
end
end
