Class: UI::Hall_of_Fame::Congratulation_Text_Box
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Hall_of_Fame::Congratulation_Text_Box
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb
Overview
Class that define the Congratulation text box stack
Constant Summary collapse
Constants inherited from SpriteStack
Instance Attribute Summary
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#bmp_filename ⇒ String
The base filename of the window.
-
#initialize(viewport, pkm) ⇒ Congratulation_Text_Box
constructor
Initialize the SpriteStack.
-
#number_of_types ⇒ Integer
Check how many types the game has.
-
#spritesheet_coordinates ⇒ Array<Integer>
The SpriteStack initial coordinates.
-
#text_coordinates ⇒ Array<Integer>
The base coordinates of the text.
-
#width ⇒ Integer
Get the width of the box.
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, pkm) ⇒ Congratulation_Text_Box
Initialize the SpriteStack
9 10 11 12 13 14 15 16 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 9 def initialize(, pkm) super(, *spritesheet_coordinates) @box = add_sprite(0, 0, bmp_filename, 1, number_of_types, type: SpriteSheet) @box.sy = pkm.type1 @text = add_text(*text_coordinates, parse_text(32, 109)) @text.fill_color = WHITE_COLOR @text.draw_shadow = false end |
Instance Method Details
#bmp_filename ⇒ String
The base filename of the window
20 21 22 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 20 def bmp_filename 'hall_of_fame/type_window' end |
#number_of_types ⇒ Integer
Check how many types the game has
32 33 34 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 32 def number_of_types return each_data_type.size end |
#spritesheet_coordinates ⇒ Array<Integer>
The SpriteStack initial coordinates
44 45 46 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 44 def spritesheet_coordinates return -184, 20 end |
#text_coordinates ⇒ Array<Integer>
The base coordinates of the text
26 27 28 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 26 def text_coordinates return 28, 5, 152, 16 end |
#width ⇒ Integer
Get the width of the box
38 39 40 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00005 Congratulation_Text_Box.rb', line 38 def width @box.width end |