Class: Window_MenuStatus
- Inherits:
-
Window_Selectable
- Object
- Window
- Window_Base
- Window_Selectable
- Window_MenuStatus
- Defined in:
- lib/rgss3_default_scripts/Window_MenuStatus.rb
Overview
** Window_MenuStatus
This window displays party member status on the screen.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#pending_index ⇒ Object
————————————————————————– * Public Instance Variables ————————————————————————–.
Attributes inherited from Window_Selectable
#cursor_all, #cursor_fix, #help_window, #index
Instance Method Summary collapse
-
#draw_item(index) ⇒ Object
————————————————————————– * Draw Item ————————————————————————–.
-
#draw_item_background(index) ⇒ Object
————————————————————————– * Draw Background for Item ————————————————————————–.
-
#initialize(x, y) ⇒ Window_MenuStatus
constructor
————————————————————————– * Object Initialization ————————————————————————–.
-
#item_height ⇒ Object
————————————————————————– * Get Item Height ————————————————————————–.
-
#item_max ⇒ Object
————————————————————————– * Get Number of Items ————————————————————————–.
-
#process_ok ⇒ Object
————————————————————————– * Processing When OK Button Is Pressed ————————————————————————–.
-
#select_last ⇒ Object
————————————————————————– * Restore Previous Selection Position ————————————————————————–.
-
#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_rect, #item_rect_for_text, #item_width, #ok_enabled?, #page_item_max, #page_row_max, #process_cancel, #process_cursor_move, #process_handling, #process_pagedown, #process_pageup, #redraw_current_item, #redraw_item, #refresh, #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(x, y) ⇒ Window_MenuStatus
-
Object Initialization
15 16 17 18 19 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 15 def initialize(x, y) super(x, y, window_width, window_height) @pending_index = -1 refresh end |
Instance Attribute Details
#pending_index ⇒ Object
-
Public Instance Variables
11 12 13 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 11 def pending_index @pending_index end |
Instance Method Details
#draw_item(index) ⇒ Object
-
Draw Item
47 48 49 50 51 52 53 54 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 47 def draw_item(index) actor = $game_party.members[index] enabled = $game_party.battle_members.include?(actor) rect = item_rect(index) draw_item_background(index) draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled) draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2) end |
#draw_item_background(index) ⇒ Object
-
Draw Background for Item
58 59 60 61 62 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 58 def draw_item_background(index) if index == @pending_index contents.fill_rect(item_rect(index), pending_color) end end |
#item_height ⇒ Object
-
Get Item Height
41 42 43 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 41 def item_height (height - standard_padding * 2) / 4 end |
#item_max ⇒ Object
-
Get Number of Items
35 36 37 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 35 def item_max $game_party.members.size end |
#process_ok ⇒ Object
-
Processing When OK Button Is Pressed
66 67 68 69 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 66 def process_ok super $game_party. = $game_party.members[index] end |
#select_last ⇒ Object
-
Restore Previous Selection Position
73 74 75 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 73 def select_last select($game_party..index || 0) end |
#window_height ⇒ Object
-
Get Window Height
29 30 31 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 29 def window_height Graphics.height end |
#window_width ⇒ Object
-
Get Window Width
23 24 25 |
# File 'lib/rgss3_default_scripts/Window_MenuStatus.rb', line 23 def window_width Graphics.width - 160 end |