Class: UI::GenericBase::ControlButton
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::GenericBase::ControlButton
- Defined in:
- docs/4_Systems_000_General_4_UI_Generics.rb
Overview
Generic Button used to help the player to know what key he can press
Constant Summary collapse
- COORDINATES =
Array of button coordinates
[[3, 219], [83, 219], [163, 219], [243, 219]]
Constants inherited from SpriteStack
Instance Attribute Summary
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, coords_index, key) ⇒ ControlButton
constructor
Create a new Button.
-
#key=(value)
Set the key shown by the button.
-
#pressed=(pressed)
(also: #set_press)
Set the button pressed.
-
#text=(value)
Set the text shown by the button.
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, coords_index, key) ⇒ ControlButton
Create a new Button
501 502 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 501 def initialize(, coords_index, key) end |
Instance Method Details
#key=(value)
Set the key shown by the button
514 515 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 514 def key=(value) end |
#pressed=(pressed) Also known as: set_press
Set the button pressed
505 506 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 505 def pressed=(pressed) end |
#text=(value)
Set the text shown by the button
510 511 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 510 def text=(value) end |