Class: Scene_Menu
- Inherits:
-
Scene_MenuBase
- Object
- Scene_Base
- Scene_MenuBase
- Scene_Menu
- Defined in:
- lib/rgss3_default_scripts/Scene_Menu.rb
Overview
** Scene_Menu
This class performs the menu screen processing.
Instance Method Summary collapse
-
#command_formation ⇒ Object
————————————————————————– * [Formation] Command ————————————————————————–.
-
#command_game_end ⇒ Object
————————————————————————– * [Exit Game] Command ————————————————————————–.
-
#command_item ⇒ Object
————————————————————————– * [Item] Command ————————————————————————–.
-
#command_personal ⇒ Object
————————————————————————– * [Skill], [Equipment] and [Status] Commands ————————————————————————–.
-
#command_save ⇒ Object
————————————————————————– * [Save] Command ————————————————————————–.
-
#create_command_window ⇒ Object
————————————————————————– * Create Command Window ————————————————————————–.
-
#create_gold_window ⇒ Object
————————————————————————– * Create Gold Window ————————————————————————–.
-
#create_status_window ⇒ Object
————————————————————————– * Create Status Window ————————————————————————–.
-
#on_formation_cancel ⇒ Object
————————————————————————– * Formation [Cancel] ————————————————————————–.
-
#on_formation_ok ⇒ Object
————————————————————————– * Formation [OK] ————————————————————————–.
-
#on_personal_cancel ⇒ Object
————————————————————————– * [Cancel] Personal Command ————————————————————————–.
-
#on_personal_ok ⇒ Object
————————————————————————– * [OK] Personal Command ————————————————————————–.
-
#start ⇒ Object
————————————————————————– * Start Processing ————————————————————————–.
Methods inherited from Scene_MenuBase
#create_background, #create_help_window, #dispose_background, #next_actor, #on_actor_change, #prev_actor, #terminate
Methods inherited from Scene_Base
#check_gameover, #create_main_viewport, #dispose_all_windows, #dispose_main_viewport, #fadeout_all, #main, #perform_transition, #post_start, #pre_terminate, #return_scene, #scene_changing?, #terminate, #transition_speed, #update, #update_all_windows, #update_basic
Instance Method Details
#command_formation ⇒ Object
- Formation
-
Command
63 64 65 66 67 68 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 63 def command_formation @status_window.select_last @status_window.activate @status_window.set_handler(:ok, method(:on_formation_ok)) @status_window.set_handler(:cancel, method(:on_formation_cancel)) end |
#command_game_end ⇒ Object
- Exit Game
-
Command
78 79 80 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 78 def command_game_end SceneManager.call(Scene_End) end |
#command_item ⇒ Object
- Item
-
Command
48 49 50 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 48 def command_item SceneManager.call(Scene_Item) end |
#command_personal ⇒ Object
- Skill], [Equipment
-
and [Status] Commands
54 55 56 57 58 59 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 54 def command_personal @status_window.select_last @status_window.activate @status_window.set_handler(:ok, method(:on_personal_ok)) @status_window.set_handler(:cancel, method(:on_personal_cancel)) end |
#command_save ⇒ Object
- Save
-
Command
72 73 74 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 72 def command_save SceneManager.call(Scene_Save) end |
#create_command_window ⇒ Object
-
Create Command Window
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 20 def create_command_window @command_window = Window_MenuCommand.new @command_window.set_handler(:item, method(:command_item)) @command_window.set_handler(:skill, method(:command_personal)) @command_window.set_handler(:equip, method(:command_personal)) @command_window.set_handler(:status, method(:command_personal)) @command_window.set_handler(:formation, method(:command_formation)) @command_window.set_handler(:save, method(:command_save)) @command_window.set_handler(:game_end, method(:command_game_end)) @command_window.set_handler(:cancel, method(:return_scene)) end |
#create_gold_window ⇒ Object
-
Create Gold Window
34 35 36 37 38 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 34 def create_gold_window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = Graphics.height - @gold_window.height end |
#create_status_window ⇒ Object
-
Create Status Window
42 43 44 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 42 def create_status_window @status_window = Window_MenuStatus.new(@command_window.width, 0) end |
#on_formation_cancel ⇒ Object
-
Formation [Cancel]
118 119 120 121 122 123 124 125 126 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 118 def on_formation_cancel if @status_window.pending_index >= 0 @status_window.pending_index = -1 @status_window.activate else @status_window.unselect @command_window.activate end end |
#on_formation_ok ⇒ Object
-
Formation [OK]
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 104 def on_formation_ok if @status_window.pending_index >= 0 $game_party.swap_order(@status_window.index, @status_window.pending_index) @status_window.pending_index = -1 @status_window.redraw_item(@status_window.index) else @status_window.pending_index = @status_window.index end @status_window.activate end |
#on_personal_cancel ⇒ Object
- Cancel
-
Personal Command
97 98 99 100 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 97 def on_personal_cancel @status_window.unselect @command_window.activate end |
#on_personal_ok ⇒ Object
- OK
-
Personal Command
84 85 86 87 88 89 90 91 92 93 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 84 def on_personal_ok case @command_window.current_symbol when :skill SceneManager.call(Scene_Skill) when :equip SceneManager.call(Scene_Equip) when :status SceneManager.call(Scene_Status) end end |
#start ⇒ Object
-
Start Processing
11 12 13 14 15 16 |
# File 'lib/rgss3_default_scripts/Scene_Menu.rb', line 11 def start super create_command_window create_gold_window create_status_window end |