Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # DO NOT DETACH THIS HEADER!!!
- #===============================================================================
- # WE Simple Menu
- # By *NightWolf687*
- #
- # CREDIT *NightWolf687* OR Nuke Games INC.
- #
- #=============================================================================
- # This script creates a simple banner-like pause menu.
- #===============================================================================
- # Free for commercial and non-commercial games.
- # BUT credit is required!
- #===============================================================================
- # Customizable Section
- #===============================================================================
- module WE
- XPOS = 0 #<= X position of the Menu
- YPOS = 0 #<= Y position of the menu
- WIDTH = 545 #<= Width of the Menu
- HEIGHT = 50 #<= Height of the Menu
- Save_Command_Name = "Save" #<= Save Text
- end
- #----------------------------------------------------------------------------
- # Don't edit past here unless you know what you're doing!!!
- #----------------------------------------------------------------------------
- class Window_WE_Menu < Window_HorzCommand
- #--------------------------------------------------------------------------
- # * Load Size Info
- #--------------------------------------------------------------------------
- def initialize(x, y, width, height)
- @window_width = width
- @window_height = height
- super(x, y)
- end
- #--------------------------------------------------------------------------
- # * Load Window Width
- #--------------------------------------------------------------------------
- def window_width
- @window_width
- end
- #--------------------------------------------------------------------------
- # * Load Window Height
- #--------------------------------------------------------------------------
- def window_height
- @window_height
- end
- #--------------------------------------------------------------------------
- # * Digits
- #--------------------------------------------------------------------------
- def col_max
- return 4
- end
- #--------------------------------------------------------------------------
- # * Command List
- #--------------------------------------------------------------------------
- def make_command_list
- add_command(Vocab::item, :item)
- add_command(WE::Save_Command_Name, :save)
- add_command(Vocab::equip, :equip)
- add_command(Vocab::game_end, :game_end)
- end
- end
- class Scene_Map < Scene_Base
- #--------------------------------------------------------------------------
- # * Call Menu
- #--------------------------------------------------------------------------
- alias :we_call_menu call_menu
- def call_menu
- we_call_menu
- Sound.play_ok
- SceneManager.call(Scene_WE_Menu)
- Window_MenuCommand::init_command_position
- end
- end
- class Scene_WE_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # * Start Menu
- #--------------------------------------------------------------------------
- def start
- super
- create_command_window
- end
- #--------------------------------------------------------------------------
- # * Create Commands
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_WE_Menu.new(WE::XPOS,WE::YPOS,WE::WIDTH,WE::HEIGHT)
- @command_window.set_handler(:item, method(:command_item))
- @command_window.set_handler(:save, method(:command_save))
- @command_window.set_handler(:equip, method(:command_equip))
- @command_window.set_handler(:game_end, method(:command_game_end))
- @command_window.set_handler(:cancel, method(:return_scene))
- end
- #--------------------------------------------------------------------------
- # * [Item]
- #--------------------------------------------------------------------------
- def command_item
- SceneManager.call(Scene_Item)
- end
- #--------------------------------------------------------------------------
- # * [Save]
- #--------------------------------------------------------------------------
- def command_save
- SceneManager.call(Scene_Save)
- end
- #---------------------------------------------------------------------------
- # * [Equip]
- #--------------------------------------------------------------------------
- def command_equip
- SceneManager.call(Scene_Equip)
- end
- #--------------------------------------------------------------------------
- # * [Exit Game]
- #--------------------------------------------------------------------------
- def command_game_end
- SceneManager.call(Scene_End)
- end
- #--------------------------------------------------------------------------
- # * Return to Game (Un-Pause)
- #--------------------------------------------------------------------------
- def return_scene
- SceneManager.call(Scene_Map)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement