Class: UI::Summary_Ribbons

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

Overview

UI part displaying the Ribbons Data of the Creature in the Summary

Constant Summary collapse

START_X =

Starting X coordinate of the first ribbon icon

Returns:

  • (Integer)
120
START_Y =

Starting Y coordinate of the first ribbon icon

Returns:

  • (Integer)
17
SPACING_X =

Spacing in pixels between 2 ribbon icons on the X axis

Returns:

  • (Integer)
45
SPACING_Y =

Spacing in pixels between 2 ribbon icons on the Y axis

Returns:

  • (Integer)
39
COLUMNS =

Amount of columns of ribbons shown at once

Returns:

  • (Integer)
4
ROWS =

Amount of rows of ribbons shown at once

Returns:

  • (Integer)
3

Constants inherited from SpriteStack

UI::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, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport) ⇒ Summary_Ribbons

Create a new Ribbons UI for the summary

Parameters:



489
490
# File 'docs/4_Systems_102_Party.rb', line 489

def initialize(viewport)
end

Instance Attribute Details

#description_text ⇒ Text (readonly)

Text containing the description of the selected ribbon

Returns:



480
481
482
# File 'docs/4_Systems_102_Party.rb', line 480

def description_text
  @description_text
end

#name_text ⇒ Text (readonly)

Tet containing the name of the selected ribbon

Returns:



477
478
479
# File 'docs/4_Systems_102_Party.rb', line 477

def name_text
  @name_text
end

#no_ribbon_text ⇒ Text (readonly)

Text shown when there are no ribbons to display

Returns:



486
487
488
# File 'docs/4_Systems_102_Party.rb', line 486

def no_ribbon_text
  @no_ribbon_text
end

#offset ⇒ Integer

Column offset for the ribbons shown, used for scrolling the view

Returns:

  • (Integer)


471
472
473
# File 'docs/4_Systems_102_Party.rb', line 471

def offset
  @offset
end

#ribbon_index ⇒ Integer

Index of the currently selected ribbon

Returns:

  • (Integer)


468
469
470
# File 'docs/4_Systems_102_Party.rb', line 468

def ribbon_index
  @ribbon_index
end

#ribbon_sprites ⇒ Array<RibbonSprite> (readonly)

Ribbons sprites

Returns:



474
475
476
# File 'docs/4_Systems_102_Party.rb', line 474

def ribbon_sprites
  @ribbon_sprites
end

#title_text ⇒ Text (readonly)

Text containing the title of the selected ribbon

Returns:



483
484
485
# File 'docs/4_Systems_102_Party.rb', line 483

def title_text
  @title_text
end

Instance Method Details

#adjust_offset

Adjust the offset of the ribbons shown to keep the selected ribbon visible



507
508
# File 'docs/4_Systems_102_Party.rb', line 507

def adjust_offset
end

#change_index(delta)

Change the selected ribbon index

Parameters:

  • delta (Integer) —

    the amount of movement to do



504
505
# File 'docs/4_Systems_102_Party.rb', line 504

def change_index(delta)
end

#data=(creature)

Set the creature data to display

Parameters:



493
494
# File 'docs/4_Systems_102_Party.rb', line 493

def data=(creature)
end

#set_title

Set or remove the title ribbon



513
514
# File 'docs/4_Systems_102_Party.rb', line 513

def set_title
end

#update_inputs

Update the UI when the player is selecting a ribbon



500
501
# File 'docs/4_Systems_102_Party.rb', line 500

def update_inputs
end

#update_ribbons

Update the ribbons shown by the UI



510
511
# File 'docs/4_Systems_102_Party.rb', line 510

def update_ribbons
end

#visible=(value)

Set the visibility of the UI

Parameters:

  • value (Boolean) —

    new visibility



497
498
# File 'docs/4_Systems_102_Party.rb', line 497

def visible=(value)
end