Class: UI::Options::Button
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Options::Button
- Defined in:
- docs/4_Systems_105_Options.rb
Overview
Button UI element
Constant Summary collapse
- OPTION_OFFSET_Y =
Offset Y of each options
40
- OPTION_BASE_X =
Base X of each options
19
- OPTION_OFFSET_X =
Offset X of each options
4
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#option ⇒ GamePlay::Options::Helper
readonly
Option modified by the button.
-
#value ⇒ Option
Current value shown by the button.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, index, option) ⇒ Button
constructor
Create a new Option Button.
-
#reload_texts
Reload the name of the button for when the language is changed in the options.
-
#value_index ⇒ Integer
Return the value index.
-
#value_text ⇒ String
Retreive the option value text.
Methods inherited from SpriteStack
#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, index, option) ⇒ Button
Create a new Option Button
125 126 |
# File 'docs/4_Systems_105_Options.rb', line 125 def initialize(, index, option) end |
Instance Attribute Details
#option ⇒ GamePlay::Options::Helper (readonly)
Option modified by the button
117 118 119 |
# File 'docs/4_Systems_105_Options.rb', line 117 def option @option end |
#value ⇒ Option
Current value shown by the button
120 121 122 |
# File 'docs/4_Systems_105_Options.rb', line 120 def value @value end |
Instance Method Details
#reload_texts
Reload the name of the button for when the language is changed in the options
140 141 |
# File 'docs/4_Systems_105_Options.rb', line 140 def reload_texts end |
#value_index ⇒ Integer
Return the value index
129 130 |
# File 'docs/4_Systems_105_Options.rb', line 129 def value_index end |
#value_text ⇒ String
Retreive the option value text
137 138 |
# File 'docs/4_Systems_105_Options.rb', line 137 def value_text end |