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

Props including this Player may implement any of the key and focus event hooks:

  key_pressed, key_typed, key_released, focus_gained, focus_lost


Public Instance methods

Returns true is this radio is button is checked.


    # File lib/limelight/builtin/players/radio_button.rb, line 54
54:         def checked
55:           return @radio_button.is_selected
56:         end

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

Alias for checked

Sets the radio button group to which this radio button belongs.


    # File lib/limelight/builtin/players/radio_button.rb, line 40
40:         def group=(group_name)
41:           @button_group = scene.button_groups[group_name]
42:           @button_group.add(@radio_button)
43:         end

Alias for checked


Alias for checked=


Alias for checked