Class: Window_EquipStatus
- Inherits:
-
Window_Base
- Object
- Window
- Window_Base
- Window_EquipStatus
- Defined in:
- lib/rgss3_default_scripts/Window_EquipStatus.rb
Overview
** Window_EquipStatus
This window displays actor parameter changes on the equipment screen.
Instance Method Summary collapse
-
#actor=(actor) ⇒ Object
————————————————————————– * Set Actor ————————————————————————–.
-
#draw_current_param(x, y, param_id) ⇒ Object
————————————————————————– * Draw Current Parameter ————————————————————————–.
-
#draw_item(x, y, param_id) ⇒ Object
————————————————————————– * Draw Item ————————————————————————–.
-
#draw_new_param(x, y, param_id) ⇒ Object
————————————————————————– * Draw Post-Equipment Change Parameter ————————————————————————–.
-
#draw_param_name(x, y, param_id) ⇒ Object
————————————————————————– * Draw Parameter Name ————————————————————————–.
-
#draw_right_arrow(x, y) ⇒ Object
————————————————————————– * Draw Right Arrow ————————————————————————–.
-
#initialize(x, y) ⇒ Window_EquipStatus
constructor
————————————————————————– * Object Initialization ————————————————————————–.
-
#refresh ⇒ Object
————————————————————————– * Refresh ————————————————————————–.
-
#set_temp_actor(temp_actor) ⇒ Object
————————————————————————– * Set Temporary Actor After Equipment Change ————————————————————————–.
-
#visible_line_number ⇒ Object
————————————————————————– * Get Number of Lines to Show ————————————————————————–.
-
#window_height ⇒ Object
————————————————————————– * Get Window Height ————————————————————————–.
-
#window_width ⇒ Object
————————————————————————– * Get Window Width ————————————————————————–.
Methods inherited from Window_Base
#activate, #actor_name, #calc_line_height, #change_color, #close, #contents_height, #contents_width, #convert_escape_characters, #create_contents, #crisis_color, #deactivate, #dispose, #draw_actor_class, #draw_actor_face, #draw_actor_graphic, #draw_actor_hp, #draw_actor_icons, #draw_actor_level, #draw_actor_mp, #draw_actor_name, #draw_actor_nickname, #draw_actor_param, #draw_actor_simple_status, #draw_actor_tp, #draw_character, #draw_currency_value, #draw_current_and_max_values, #draw_face, #draw_gauge, #draw_icon, #draw_item_name, #draw_text, #draw_text_ex, #fitting_height, #gauge_back_color, #hide, #hp_color, #hp_gauge_color1, #hp_gauge_color2, #knockout_color, #line_height, #make_font_bigger, #make_font_smaller, #mp_color, #mp_cost_color, #mp_gauge_color1, #mp_gauge_color2, #normal_color, #obtain_escape_code, #obtain_escape_param, #open, #param_change_color, #party_member_name, #pending_color, #power_down_color, #power_up_color, #process_character, #process_draw_icon, #process_escape_character, #process_new_line, #process_new_page, #process_normal_character, #reset_font_settings, #show, #standard_padding, #system_color, #text_color, #text_size, #tp_color, #tp_cost_color, #tp_gauge_color1, #tp_gauge_color2, #translucent_alpha, #update, #update_close, #update_open, #update_padding, #update_tone
Constructor Details
#initialize(x, y) ⇒ Window_EquipStatus
-
Object Initialization
11 12 13 14 15 16 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 11 def initialize(x, y) super(x, y, window_width, window_height) @actor = nil @temp_actor = nil refresh end |
Instance Method Details
#actor=(actor) ⇒ Object
-
Set Actor
38 39 40 41 42 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 38 def actor=(actor) return if @actor == actor @actor = actor refresh end |
#draw_current_param(x, y, param_id) ⇒ Object
-
Draw Current Parameter
78 79 80 81 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 78 def draw_current_param(x, y, param_id) change_color(normal_color) draw_text(x, y, 32, line_height, @actor.param(param_id), 2) end |
#draw_item(x, y, param_id) ⇒ Object
-
Draw Item
62 63 64 65 66 67 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 62 def draw_item(x, y, param_id) draw_param_name(x + 4, y, param_id) draw_current_param(x + 94, y, param_id) if @actor draw_right_arrow(x + 126, y) draw_new_param(x + 150, y, param_id) if @temp_actor end |
#draw_new_param(x, y, param_id) ⇒ Object
-
Draw Post-Equipment Change Parameter
92 93 94 95 96 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 92 def draw_new_param(x, y, param_id) new_value = @temp_actor.param(param_id) change_color(param_change_color(new_value - @actor.param(param_id))) draw_text(x, y, 32, line_height, new_value, 2) end |
#draw_param_name(x, y, param_id) ⇒ Object
-
Draw Parameter Name
71 72 73 74 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 71 def draw_param_name(x, y, param_id) change_color(system_color) draw_text(x, y, 80, line_height, Vocab::param(param_id)) end |
#draw_right_arrow(x, y) ⇒ Object
-
Draw Right Arrow
85 86 87 88 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 85 def draw_right_arrow(x, y) change_color(system_color) draw_text(x, y, 22, line_height, "→", 1) end |
#refresh ⇒ Object
-
Refresh
46 47 48 49 50 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 46 def refresh contents.clear draw_actor_name(@actor, 4, 0) if @actor 6.times {|i| draw_item(0, line_height * (1 + i), 2 + i) } end |
#set_temp_actor(temp_actor) ⇒ Object
-
Set Temporary Actor After Equipment Change
54 55 56 57 58 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 54 def set_temp_actor(temp_actor) return if @temp_actor == temp_actor @temp_actor = temp_actor refresh end |
#visible_line_number ⇒ Object
-
Get Number of Lines to Show
32 33 34 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 32 def visible_line_number return 7 end |
#window_height ⇒ Object
-
Get Window Height
26 27 28 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 26 def window_height fitting_height(visible_line_number) end |
#window_width ⇒ Object
-
Get Window Width
20 21 22 |
# File 'lib/rgss3_default_scripts/Window_EquipStatus.rb', line 20 def window_width return 208 end |