Class: MG::RadioButton

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

Overview

RadioButton is a specific type of two-states button that is similar to CheckBox.

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

#add, #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

#initialize(background, cross) ⇒ RadioButton

Creates a new RadioButton widget.

Parameters:

  • background (String)

    a background texture name.

  • cross (String)

    a cross texture name.



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

def initialize(background, cross); end

Instance Method Details

#selected=(value) ⇒ Object

Set selected state for radio button.

Parameters:

  • value (Boolean)

    true that radio button is selected, false otherwise.



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

def selected=(value); end

#selected?Boolean

Get selected state of radio button.

Returns:

  • (Boolean)

    true if radio button is selected.



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

def selected?; end