Class: MG::RadioButtonGroup

Inherits:
Widget show all
Defined in:
doc/API_reference.rb

Overview

RadioButtonGroup groups designated radio buttons to make them interact to each other.

Instance Attribute Summary

Attributes inherited from Node

#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #z_index

Constructors collapse

Instance Method Summary collapse

Methods inherited from Widget

#enabled=, #enabled?, #highlighted=, #highlighted?, #on_touch, #touch_enabled=, #touch_enabled?

Methods inherited from Node

#children, #clear, #delete, #delete_from_parent, #intersects?, #number_of_running_actions, #parent, #run_action, #schedule, #schedule_once, #stop_action, #stop_all_actions, #unschedule, #visible=, #visible?

Constructor Details

#initializeRadioButtonGroup

Create and return a empty RadioButtonGroup instance



1500
# File 'doc/API_reference.rb', line 1500

def initialize; end

Instance Method Details

#<<(button) ⇒ Object

This is alias method of #add.



1511
# File 'doc/API_reference.rb', line 1511

def <<(button); end

#add(button) ⇒ self

Add a radio button into this group.

Parameters:

Returns:

  • (self)

    the receiver.



1508
# File 'doc/API_reference.rb', line 1508

def add(button); end

#select(value) ⇒ self

Select a radio button.

Parameters:

  • value (RadioButton, Integer)

    Select a radio button by RadioButton instance if it was given. If Integer value was given, select a radio button by index.

Returns:

  • (self)

    the receiver.



1517
# File 'doc/API_reference.rb', line 1517

def select(value); end

#selectedInteger

Get the index of selected radio button.

Returns:

  • (Integer)

    the index of selected radio button.



1521
# File 'doc/API_reference.rb', line 1521

def selected; end