Class: UI::Hall_of_Fame::Dead_Pokemon_Text
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Hall_of_Fame::Dead_Pokemon_Text
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00011 Dead_Pokemon_Text.rb
Overview
Class that define the Dead Pokemon text
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, x, y) ⇒ Dead_Pokemon_Text
constructor
Initialize the SpriteStack.
-
#text=(pkm)
Change the text according to the data sent.
-
#text_coordinate ⇒ Array<Integer>
The base coordinates of the text.
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, x, y) ⇒ Dead_Pokemon_Text
Initialize the SpriteStack
10 11 12 13 14 15 16 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00011 Dead_Pokemon_Text.rb', line 10 def initialize(, x, y) super(, x, y) @box = add_sprite(0, 0, bmp_filename) @text = add_text(*text_coordinate, nil.to_s, 1) @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/00011 Dead_Pokemon_Text.rb', line 20 def bmp_filename 'hall_of_fame/text_window' end |
#text=(pkm)
Change the text according to the data sent
32 33 34 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00011 Dead_Pokemon_Text.rb', line 32 def text=(pkm) @text.text = ext_text(9004, 0) + ' ' + pkm.given_name end |
#text_coordinate ⇒ Array<Integer>
The base coordinates of the text
26 27 28 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00011 Dead_Pokemon_Text.rb', line 26 def text_coordinate return 39, 5, 222, 16 end |