Class: UI::SaveSign

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00003 Save Load/00001 UI/00001 SaveSign.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

Attributes inherited from SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

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

Parameters:

Instance Attribute Details

#save_indexInteger

Get the index of the save

Returns:

#visual_indexInteger

Get the visual index of the save sign

Returns:

Instance Method Details

#animate_cursor

#coordinates(visual_index) ⇒ Array<Integer>

Get the coordinate of the element based on its coordinate

Parameters:

  • visual_index (Integer)

    visual index of the UI element

Returns:

#data=(value)

Set the data of the SaveSign

Parameters:

#done?Boolean

Tell if the animation is done

Returns:

  • (Boolean)

#move_to_visual_index(target_visual_index)

Start the animation of moving between index

Parameters:

#update

Update the animation