Class: Window_BattleStatus
- Inherits:
-
Window_Selectable
- Object
- Window
- Window_Base
- Window_Selectable
- Window_BattleStatus
- Defined in:
- lib/rgss3_default_scripts/Window_BattleStatus.rb
Overview
** Window_BattleStatus
This window is for displaying the status of party members on the battle
screen.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Window_Selectable
#cursor_all, #cursor_fix, #help_window, #index
Instance Method Summary collapse
-
#basic_area_rect(index) ⇒ Object
————————————————————————– * Get Basic Area Retangle ————————————————————————–.
-
#draw_basic_area(rect, actor) ⇒ Object
————————————————————————– * Draw Basic Area ————————————————————————–.
-
#draw_gauge_area(rect, actor) ⇒ Object
————————————————————————– * Draw Gauge Area ————————————————————————–.
-
#draw_gauge_area_with_tp(rect, actor) ⇒ Object
————————————————————————– * Draw Gauge Area (with TP) ————————————————————————–.
-
#draw_gauge_area_without_tp(rect, actor) ⇒ Object
————————————————————————– * Draw Gauge Area (without TP) ————————————————————————–.
-
#draw_item(index) ⇒ Object
————————————————————————– * Draw Item ————————————————————————–.
-
#gauge_area_rect(index) ⇒ Object
————————————————————————– * Get Gauge Area Rectangle ————————————————————————–.
-
#gauge_area_width ⇒ Object
————————————————————————– * Get Gauge Area Width ————————————————————————–.
-
#initialize ⇒ Window_BattleStatus
constructor
————————————————————————– * Object Initialization ————————————————————————–.
-
#item_max ⇒ Object
————————————————————————– * Get Number of Items ————————————————————————–.
-
#refresh ⇒ Object
————————————————————————– * Refresh ————————————————————————–.
-
#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_Selectable
#active=, #bottom_row, #bottom_row=, #call_cancel_handler, #call_handler, #call_ok_handler, #call_update_help, #cancel_enabled?, #clear_item, #col_max, #contents_height, #current_item_enabled?, #cursor_down, #cursor_left, #cursor_movable?, #cursor_pagedown, #cursor_pageup, #cursor_right, #cursor_up, #draw_all_items, #ensure_cursor_visible, #handle?, #height=, #horizontal?, #item_height, #item_rect, #item_rect_for_text, #item_width, #ok_enabled?, #page_item_max, #page_row_max, #process_cancel, #process_cursor_move, #process_handling, #process_ok, #process_pagedown, #process_pageup, #redraw_current_item, #redraw_item, #row, #row_max, #select, #set_handler, #spacing, #top_row, #top_row=, #unselect, #update, #update_cursor, #update_help, #update_padding, #update_padding_bottom
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 ⇒ Window_BattleStatus
-
Object Initialization
12 13 14 15 16 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 12 def initialize super(0, 0, window_width, window_height) refresh self.openness = 0 end |
Instance Method Details
#basic_area_rect(index) ⇒ Object
-
Get Basic Area Retangle
59 60 61 62 63 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 59 def basic_area_rect(index) rect = item_rect_for_text(index) rect.width -= gauge_area_width + 10 rect end |
#draw_basic_area(rect, actor) ⇒ Object
-
Draw Basic Area
82 83 84 85 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 82 def draw_basic_area(rect, actor) draw_actor_name(actor, rect.x + 0, rect.y, 100) draw_actor_icons(actor, rect.x + 104, rect.y, rect.width - 104) end |
#draw_gauge_area(rect, actor) ⇒ Object
-
Draw Gauge Area
89 90 91 92 93 94 95 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 89 def draw_gauge_area(rect, actor) if $data_system.opt_display_tp draw_gauge_area_with_tp(rect, actor) else draw_gauge_area_without_tp(rect, actor) end end |
#draw_gauge_area_with_tp(rect, actor) ⇒ Object
-
Draw Gauge Area (with TP)
99 100 101 102 103 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 99 def draw_gauge_area_with_tp(rect, actor) draw_actor_hp(actor, rect.x + 0, rect.y, 72) draw_actor_mp(actor, rect.x + 82, rect.y, 64) draw_actor_tp(actor, rect.x + 156, rect.y, 64) end |
#draw_gauge_area_without_tp(rect, actor) ⇒ Object
-
Draw Gauge Area (without TP)
107 108 109 110 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 107 def draw_gauge_area_without_tp(rect, actor) draw_actor_hp(actor, rect.x + 0, rect.y, 134) draw_actor_mp(actor, rect.x + 144, rect.y, 76) end |
#draw_item(index) ⇒ Object
-
Draw Item
51 52 53 54 55 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 51 def draw_item(index) actor = $game_party.battle_members[index] draw_basic_area(basic_area_rect(index), actor) draw_gauge_area(gauge_area_rect(index), actor) end |
#gauge_area_rect(index) ⇒ Object
-
Get Gauge Area Rectangle
67 68 69 70 71 72 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 67 def gauge_area_rect(index) rect = item_rect_for_text(index) rect.x += rect.width - gauge_area_width rect.width = gauge_area_width rect end |
#gauge_area_width ⇒ Object
-
Get Gauge Area Width
76 77 78 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 76 def gauge_area_width return 220 end |
#item_max ⇒ Object
-
Get Number of Items
38 39 40 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 38 def item_max $game_party.battle_members.size end |
#refresh ⇒ Object
-
Refresh
44 45 46 47 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 44 def refresh contents.clear draw_all_items end |
#visible_line_number ⇒ Object
-
Get Number of Lines to Show
32 33 34 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.rb', line 32 def visible_line_number return 4 end |
#window_height ⇒ Object
-
Get Window Height
26 27 28 |
# File 'lib/rgss3_default_scripts/Window_BattleStatus.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_BattleStatus.rb', line 20 def window_width Graphics.width - 128 end |