Class: UI::RibbonSprite

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_000_General_4_UI_Generics.rb

Overview

Class that show the ribbon of a Creature

Constant Summary collapse

SELECTOR_SPRITE =

Selector sprite

Returns:

'summary/ribbon_selector'
TITLE_SELECTOR_SPRITE =

Title selector sprite

Returns:

'summary/title_ribbon_selector'

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

#animated, #data, #font_id, #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, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport) ⇒ RibbonSprite

Create a new Ribbon Sprite

Parameters:

  • viewport (Viewport, nil) —

    the viewport in which the sprite is stored



718
719
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 718

def initialize(viewport)
end

Instance Attribute Details

#ribbon ⇒ Sprite (readonly)

Sprite of the ribbon

Returns:



709
710
711
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 709

def ribbon
  @ribbon
end

#selector ⇒ Sprite (readonly)

Sprite of the selector shown when the ribbon is hovered

Returns:



712
713
714
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 712

def selector
  @selector
end

#title_selector ⇒ Sprite (readonly)

Sprite of the secondary selector shown when the ribbon is currently giving its title to the creature

Returns:



715
716
717
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 715

def title_selector
  @title_selector
end

Instance Method Details

#data=(ribbon)

Set the ribbon data

Parameters:



730
731
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 730

def data=(ribbon)
end

#select(selected)

Select or unselect the ribbon

Parameters:

  • selected (Boolean) —

    if the ribbon is selected or not



722
723
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 722

def select(selected)
end

#select_title(selected)

Set this ribbon as giving title or not

Parameters:

  • selected (Boolean) —

    if the ribbon is giving title or not



726
727
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 726

def select_title(selected)
end