Class: Window_HorzCommand
- Inherits:
-
Window_Command
- Object
- Window
- Window_Base
- Window_Selectable
- Window_Command
- Window_HorzCommand
- Defined in:
- lib/rgss3_default_scripts/Window_HorzCommand.rb
Overview
** Window_HorzCommand
This is a command window for the horizontal selection format.
Direct Known Subclasses
Window_EquipCommand, Window_ItemCategory, Window_ShopCommand
Instance Attribute Summary
Attributes inherited from Window_Selectable
#cursor_all, #cursor_fix, #help_window, #index
Instance Method Summary collapse
-
#alignment ⇒ Object
————————————————————————– * Get Alignment ————————————————————————–.
-
#bottom_col ⇒ Object
————————————————————————– * Get Trailing Digits ————————————————————————–.
-
#bottom_col=(col) ⇒ Object
————————————————————————– * Set Trailing Digits ————————————————————————–.
-
#col_max ⇒ Object
————————————————————————– * Get Digit Count ————————————————————————–.
-
#contents_height ⇒ Object
————————————————————————– * Calculate Height of Window Contents ————————————————————————–.
-
#contents_width ⇒ Object
————————————————————————– * Calculate Width of Window Contents ————————————————————————–.
-
#cursor_down(wrap = false) ⇒ Object
————————————————————————– * Move Cursor Down ————————————————————————–.
-
#cursor_pagedown ⇒ Object
————————————————————————– * Move Cursor One Page Down ————————————————————————–.
-
#cursor_pageup ⇒ Object
————————————————————————– * Move Cursor One Page Up ————————————————————————–.
-
#cursor_up(wrap = false) ⇒ Object
————————————————————————– * Move Cursor Up ————————————————————————–.
-
#ensure_cursor_visible ⇒ Object
————————————————————————– * Scroll Cursor to Position Within Screen ————————————————————————–.
-
#item_rect(index) ⇒ Object
————————————————————————– * Get Rectangle for Displaying Items ————————————————————————–.
-
#spacing ⇒ Object
————————————————————————– * Get Spacing for Items Arranged Side by Side ————————————————————————–.
-
#top_col ⇒ Object
————————————————————————– * Get Leading Digits ————————————————————————–.
-
#top_col=(col) ⇒ Object
————————————————————————– * Set Leading Digits ————————————————————————–.
-
#visible_line_number ⇒ Object
————————————————————————– * Get Number of Lines to Show ————————————————————————–.
Methods inherited from Window_Command
#add_command, #call_ok_handler, #clear_command_list, #command_enabled?, #command_name, #current_data, #current_ext, #current_item_enabled?, #current_symbol, #draw_item, #initialize, #item_max, #make_command_list, #ok_enabled?, #refresh, #select_ext, #select_symbol, #window_height, #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, #current_item_enabled?, #cursor_left, #cursor_movable?, #cursor_right, #draw_all_items, #draw_item, #handle?, #height=, #horizontal?, #initialize, #item_height, #item_max, #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, #refresh, #row, #row_max, #select, #set_handler, #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, #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, #initialize, #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
This class inherits a constructor from Window_Command
Instance Method Details
#alignment ⇒ Object
-
Get Alignment
83 84 85 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 83 def alignment return 1 end |
#bottom_col ⇒ Object
-
Get Trailing Digits
55 56 57 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 55 def bottom_col top_col + col_max - 1 end |
#bottom_col=(col) ⇒ Object
-
Set Trailing Digits
61 62 63 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 61 def bottom_col=(col) self.top_col = col - (col_max - 1) end |
#col_max ⇒ Object
-
Get Digit Count
17 18 19 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 17 def col_max return 4 end |
#contents_height ⇒ Object
-
Calculate Height of Window Contents
35 36 37 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 35 def contents_height item_height end |
#contents_width ⇒ Object
-
Calculate Width of Window Contents
29 30 31 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 29 def contents_width (item_width + spacing) * item_max - spacing end |
#cursor_down(wrap = false) ⇒ Object
-
Move Cursor Down
89 90 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 89 def cursor_down(wrap = false) end |
#cursor_pagedown ⇒ Object
-
Move Cursor One Page Down
99 100 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 99 def cursor_pagedown end |
#cursor_pageup ⇒ Object
-
Move Cursor One Page Up
104 105 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 104 def cursor_pageup end |
#cursor_up(wrap = false) ⇒ Object
-
Move Cursor Up
94 95 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 94 def cursor_up(wrap = false) end |
#ensure_cursor_visible ⇒ Object
-
Scroll Cursor to Position Within Screen
67 68 69 70 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 67 def ensure_cursor_visible self.top_col = index if index < top_col self.bottom_col = index if index > bottom_col end |
#item_rect(index) ⇒ Object
-
Get Rectangle for Displaying Items
74 75 76 77 78 79 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 74 def item_rect(index) rect = super rect.x = index * (item_width + spacing) rect.y = 0 rect end |
#spacing ⇒ Object
-
Get Spacing for Items Arranged Side by Side
23 24 25 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 23 def spacing return 8 end |
#top_col ⇒ Object
-
Get Leading Digits
41 42 43 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 41 def top_col ox / (item_width + spacing) end |
#top_col=(col) ⇒ Object
-
Set Leading Digits
47 48 49 50 51 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 47 def top_col=(col) col = 0 if col < 0 col = col_max - 1 if col > col_max - 1 self.ox = col * (item_width + spacing) end |
#visible_line_number ⇒ Object
-
Get Number of Lines to Show
11 12 13 |
# File 'lib/rgss3_default_scripts/Window_HorzCommand.rb', line 11 def visible_line_number return 1 end |