Class: UI::SaveSign
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::SaveSign
- Defined in:
- docs/4_Systems_106_Save_Load.rb
Overview
UI element showing the save information
Constant Summary collapse
- CORRUPTED_MESSAGE =
String shown when a save is corrupted
'Corrupted Save File'
- SAVE_INDEX_MESSAGE =
String shown when a save is not corrupted and can be choosen
'Save %d'
Constants inherited from SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
Instance Attribute Summary collapse
-
#save_index ⇒ Integer
Get the index of the save.
-
#visual_index ⇒ Integer
Get the visual index of the save sign.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#animate_cursor
Animate the cursor when moving.
-
#coordinates(visual_index) ⇒ Array<Integer>
Get the coordinate of the element based on its coordinate.
-
#data=(value)
Set the data of the SaveSign.
-
#done? ⇒ Boolean
Tell if the animation is done.
-
#initialize(viewport, visual_index) ⇒ SaveSign
constructor
Create a new save sign.
-
#move_to_visual_index(target_visual_index)
Start the animation of moving between index.
-
#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, visual_index) ⇒ SaveSign
Create a new save sign
50 51 |
# File 'docs/4_Systems_106_Save_Load.rb', line 50 def initialize(, visual_index) end |
Instance Attribute Details
#save_index ⇒ Integer
Get the index of the save
39 40 41 |
# File 'docs/4_Systems_106_Save_Load.rb', line 39 def save_index @save_index end |
#visual_index ⇒ Integer
Get the visual index of the save sign
42 43 44 |
# File 'docs/4_Systems_106_Save_Load.rb', line 42 def visual_index @visual_index end |
Instance Method Details
#animate_cursor
Animate the cursor when moving
68 69 |
# File 'docs/4_Systems_106_Save_Load.rb', line 68 def animate_cursor end |
#coordinates(visual_index) ⇒ Array<Integer>
Get the coordinate of the element based on its coordinate
73 74 |
# File 'docs/4_Systems_106_Save_Load.rb', line 73 def coordinates(visual_index) end |
#data=(value)
Set the data of the SaveSign
54 55 |
# File 'docs/4_Systems_106_Save_Load.rb', line 54 def data=(value) end |
#done? ⇒ Boolean
Tell if the animation is done
61 62 |
# File 'docs/4_Systems_106_Save_Load.rb', line 61 def done? end |
#move_to_visual_index(target_visual_index)
Start the animation of moving between index
65 66 |
# File 'docs/4_Systems_106_Save_Load.rb', line 65 def move_to_visual_index(target_visual_index) end |
#update
Update the animation
57 58 |
# File 'docs/4_Systems_106_Save_Load.rb', line 57 def update end |