Class: Window_MenuCommand
- Inherits:
-
Window_Command
- Object
- Window
- Window_Base
- Window_Selectable
- Window_Command
- Window_MenuCommand
- Defined in:
- lib/rgss3_default_scripts/Window_MenuCommand.rb
Overview
** Window_MenuCommand
This command window appears on the menu screen.
Instance Attribute Summary
Attributes inherited from Window_Selectable
#cursor_all, #cursor_fix, #help_window, #index
Class Method Summary collapse
-
.init_command_position ⇒ Object
————————————————————————– * Initialize Command Selection Position (Class Method) ————————————————————————–.
Instance Method Summary collapse
-
#add_formation_command ⇒ Object
————————————————————————– * Add Formation to Command List ————————————————————————–.
-
#add_game_end_command ⇒ Object
————————————————————————– * Add Exit Game to Command List ————————————————————————–.
-
#add_main_commands ⇒ Object
————————————————————————– * Add Main Commands to List ————————————————————————–.
-
#add_original_commands ⇒ Object
————————————————————————– * For Adding Original Commands ————————————————————————–.
-
#add_save_command ⇒ Object
————————————————————————– * Add Save to Command List ————————————————————————–.
-
#formation_enabled ⇒ Object
————————————————————————– * Get Activation State of Formation ————————————————————————–.
-
#initialize ⇒ Window_MenuCommand
constructor
————————————————————————– * Object Initialization ————————————————————————–.
-
#main_commands_enabled ⇒ Object
————————————————————————– * Get Activation State of Main Commands ————————————————————————–.
-
#make_command_list ⇒ Object
————————————————————————– * Create Command List ————————————————————————–.
-
#process_ok ⇒ Object
————————————————————————– * Processing When OK Button Is Pressed ————————————————————————–.
-
#save_enabled ⇒ Object
————————————————————————– * Get Activation State of Save ————————————————————————–.
-
#select_last ⇒ Object
————————————————————————– * Restore Previous Selection Position ————————————————————————–.
-
#visible_line_number ⇒ Object
————————————————————————– * Get Number of Lines to Show ————————————————————————–.
-
#window_width ⇒ Object
————————————————————————– * Get Window Width ————————————————————————–.
Methods inherited from Window_Command
#add_command, #alignment, #call_ok_handler, #clear_command_list, #command_enabled?, #command_name, #current_data, #current_ext, #current_item_enabled?, #current_symbol, #draw_item, #item_max, #ok_enabled?, #refresh, #select_ext, #select_symbol, #window_height
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, #draw_item, #ensure_cursor_visible, #handle?, #height=, #horizontal?, #item_height, #item_max, #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 ⇒ Window_MenuCommand
-
Object Initialization
17 18 19 20 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 17 def initialize super(0, 0) select_last end |
Class Method Details
.init_command_position ⇒ Object
-
Initialize Command Selection Position (Class Method)
11 12 13 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 11 def self.init_command_position @@last_command_symbol = nil end |
Instance Method Details
#add_formation_command ⇒ Object
-
Add Formation to Command List
55 56 57 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 55 def add_formation_command add_command(Vocab::formation, :formation, formation_enabled) end |
#add_game_end_command ⇒ Object
-
Add Exit Game to Command List
72 73 74 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 72 def add_game_end_command add_command(Vocab::game_end, :game_end) end |
#add_main_commands ⇒ Object
-
Add Main Commands to List
46 47 48 49 50 51 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 46 def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) add_command(Vocab::skill, :skill, main_commands_enabled) add_command(Vocab::equip, :equip, main_commands_enabled) add_command(Vocab::status, :status, main_commands_enabled) end |
#add_original_commands ⇒ Object
-
For Adding Original Commands
61 62 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 61 def add_original_commands end |
#add_save_command ⇒ Object
-
Add Save to Command List
66 67 68 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 66 def add_save_command add_command(Vocab::save, :save, save_enabled) end |
#formation_enabled ⇒ Object
-
Get Activation State of Formation
84 85 86 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 84 def formation_enabled $game_party.members.size >= 2 && !$game_system.formation_disabled end |
#main_commands_enabled ⇒ Object
-
Get Activation State of Main Commands
78 79 80 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 78 def main_commands_enabled $game_party.exists end |
#make_command_list ⇒ Object
-
Create Command List
36 37 38 39 40 41 42 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 36 def make_command_list add_main_commands add_formation_command add_original_commands add_save_command add_game_end_command end |
#process_ok ⇒ Object
-
Processing When OK Button Is Pressed
96 97 98 99 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 96 def process_ok @@last_command_symbol = current_symbol super end |
#save_enabled ⇒ Object
-
Get Activation State of Save
90 91 92 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 90 def save_enabled !$game_system.save_disabled end |
#select_last ⇒ Object
-
Restore Previous Selection Position
103 104 105 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 103 def select_last select_symbol(@@last_command_symbol) end |
#visible_line_number ⇒ Object
-
Get Number of Lines to Show
30 31 32 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 30 def visible_line_number item_max end |
#window_width ⇒ Object
-
Get Window Width
24 25 26 |
# File 'lib/rgss3_default_scripts/Window_MenuCommand.rb', line 24 def window_width return 160 end |