Class: UI::Hall_of_Fame::Trainer_Infos_Text_Box
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Hall_of_Fame::Trainer_Infos_Text_Box
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb
Overview
Class that define the Trainer Infos text box stack
Constant Summary collapse
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#id_no ⇒ Text
The id_no text.
-
#name ⇒ Text
The name text.
-
#play_time ⇒ Text
The play_time text.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#box_filename ⇒ String
The base filename of the window.
-
#id_no_coordinates ⇒ Array<Integer>
The base coordinates of the id_no text.
-
#initial_coordinates ⇒ Array<Integer>
The SpriteStack initial coordinates.
-
#initialize(viewport) ⇒ Trainer_Infos_Text_Box
constructor
Initialize the SpriteStack.
-
#name_coordinates ⇒ Array<Integer>
The base coordinates of the name text.
-
#play_time_coordinates ⇒ Array<Integer>
The base coordinates of the play_time text.
-
#y_final ⇒ Integer
Get the constant's value.
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) ⇒ Trainer_Infos_Text_Box
Initialize the SpriteStack
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 18 def initialize() super(, *initial_coordinates) @box = add_sprite(0, 0, box_filename) @name = add_text(*name_coordinates, $trainer.name, 0) @id_no = add_text(*id_no_coordinates, format('%<text>s %<id>05d', text: text_get(34, 2), id: $trainer.id % 100_000), 0) @play_time = add_text(*play_time_coordinates, PFM.game_state.trainer.play_time_text, 2, type: Text) @name.fill_color = WHITE_COLOR @name.draw_shadow = false @name.opacity = 0 @id_no.fill_color = WHITE_COLOR @id_no.draw_shadow = false @id_no.opacity = 0 @play_time.fill_color = WHITE_COLOR @play_time.draw_shadow = false @play_time.opacity = 0 end |
Instance Attribute Details
#id_no ⇒ Text
The id_no text
10 11 12 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 10 def id_no @id_no end |
#name ⇒ Text
The name text
7 8 9 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 7 def name @name end |
#play_time ⇒ Text
The play_time text
13 14 15 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 13 def play_time @play_time end |
Instance Method Details
#box_filename ⇒ String
The base filename of the window
44 45 46 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 44 def box_filename 'hall_of_fame/text_window' end |
#id_no_coordinates ⇒ Array<Integer>
The base coordinates of the id_no text
62 63 64 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 62 def id_no_coordinates return 113, 5, 88, 16 end |
#initial_coordinates ⇒ Array<Integer>
The SpriteStack initial coordinates
38 39 40 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 38 def initial_coordinates return 10, 240 end |
#name_coordinates ⇒ Array<Integer>
The base coordinates of the name text
56 57 58 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 56 def name_coordinates return 42, 5, 57, 16 end |
#play_time_coordinates ⇒ Array<Integer>
The base coordinates of the play_time text
68 69 70 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00023 Trainer_Infos_Text_Box.rb', line 68 def play_time_coordinates return 202, 5, 55, 16 end |