Class: UI::TitleControls
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::TitleControls
- Defined in:
- scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb
Overview
UI component showing the controls of the title screen (Play / Credits)
Constant Summary
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#credit_bg ⇒ Sprite
readonly
Get the credit bg button.
-
#index ⇒ Integer
Get the index of the selection.
-
#play_bg ⇒ Sprite
readonly
Get the play bg button.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#done? ⇒ Boolean
Tell if the controls are done transitionning.
-
#initialize(viewport) ⇒ TitleControls
constructor
A new instance of TitleControls.
-
#update
Update the animation.
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_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport) ⇒ TitleControls
Returns a new instance of TitleControls.
14 15 16 17 18 19 20 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 14 def initialize() super(, 0, 240, default_cache: :title) create_sprites self.index = 0 @wait_duration = Configs.scene_title_config.control_wait || 0.5 create_animation end |
Instance Attribute Details
#credit_bg ⇒ Sprite (readonly)
Get the credit bg button
12 13 14 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 12 def credit_bg @credit_bg end |
#index ⇒ Integer
Get the index of the selection
6 7 8 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 6 def index @index end |
#play_bg ⇒ Sprite (readonly)
Get the play bg button
9 10 11 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 9 def play_bg @play_bg end |
Instance Method Details
#done? ⇒ Boolean
Tell if the controls are done transitionning
38 39 40 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 38 def done? @animation.done? end |
#update
Update the animation
31 32 33 34 |
# File 'scripts/01450 Systems/00001 Title/00002 UI_Title/00001 TitleControls.rb', line 31 def update super @animation.update end |