Class: UI::Hall_of_Fame::League_Champion_Text_Box

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb

Overview

Class that define the League Champion text box stack

Constant Summary collapse

Y_FINAL =
10
WHITE_COLOR =
Color.new(255, 255, 255, 255)

Constants inherited from SpriteStack

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

Constructor Details

#initialize(viewport) ⇒ League_Champion_Text_Box

Initialize the SpriteStack

Parameters:



10
11
12
13
14
15
16
17
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 10

def initialize(viewport)
  super(viewport, *initial_coordinates)
  @box = add_sprite(0, 0, box_filename)
  @text = add_text(*text_coordinates, parse_text(32, 111), 1)
  @text.fill_color = WHITE_COLOR
  @text.draw_shadow = false
  @text.opacity = 0
end

Instance Attribute Details

#text

Returns the value of attribute text.



5
6
7
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 5

def text
  @text
end

Instance Method Details

#box_filenameString

The base filename of the window

Returns:



27
28
29
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 27

def box_filename
  'hall_of_fame/text_window_congrats'
end

#initial_coordinatesArray<Integer>

The SpriteStack initial coordinates

Returns:

  • (Array<Integer>)

    the coordinates



21
22
23
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 21

def initial_coordinates
  return 10, -28
end

#text_coordinatesArray<Integer>

The base coordinates of the text

Returns:

  • (Array<Integer>)

    the coordinates



39
40
41
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 39

def text_coordinates
  return 40, 5, 220, 16
end

#y_finalInteger

Get the constant's value

Returns:



33
34
35
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00022 League_Champion_Text_Box.rb', line 33

def y_final
  Y_FINAL
end