Module | Limelight::Builtin::Players::RadioButton |
In: |
lib/limelight/builtin/players/radio_button.rb
|
A Builtin Player that adds the look and behavior of a native radio button. It may be applied in the PropBuilder DSL like so:
my_radio_button :players => "radio_button", :id => "radio1", :group => "my_radio_button_group"
When including this Player, it‘s important to specify a group and id. All radio buttons in the same group will be mutually exclusive. The value of a radio button group will be the id of the selected radio button.
Props including this Player may implement the button_pressed hook.
def button_pressed(e) # do something end
Props including this Player may implement any of the key and focus event hooks:
key_pressed, key_typed, key_released, focus_gained, focus_lost
Checks or unchecks this radio button.
# File lib/limelight/builtin/players/radio_button.rb, line 47 47: def checked=(value) 48: @radio_button.selected = value 49: end