Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Pause Menu
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Pause_Menu]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 28/o3/2o13 - Finished,
- # 27/o3/2o13 - Started
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script modifies Scene_End and allows it to use graphics for each command
- # option.
- #
- # I Highly reccommend using this paired with my $D13x - Scene Backgrounds script
- # And my $D13x - Key Menu Script, this will give you the ability to create
- # highly unique 'Pause' screens with minimum effort.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- module GE_Graph
- #===============================================================================
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ General Settings
- #-----------------------------------------------------------------------------
- # All Command Graphics Must be in the below folder.
- Graphics_Folder = "Graphics/$D13x Game End/"
- #-----------------------------------------------------------------------------
- # Opacity [ min , max, increase per frame]
- Opacity = [ 80 , 255 , 2]
- #-----------------------------------------------------------------------------
- # Visible Commands.
- # Command , Name , Graphic , y , Hue , z ]
- Commands=[
- [:continue, "Continue", "Continue", 200, 0, 50],
- # [:to_menu , "To Menu" , "To_Menu" , 230, 0, 50],
- [:to_title, "To Title", "To_Title", 250, 0, 50],
- [:shutdown, "Shutdown", "ShutDown", 300, 0, 50],
- ]
- #-----------------------------------------------------------------------------
- # Remove ' Game End ' option from main menu
- Remove_From_Menu = true
- end #####################
- # CUSTOMISATION END #
- #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- module Cache
- #===============================================================================
- #--------------------------------------------------------------------------
- # Get Windowskin
- #--------------------------------------------------------------------------
- def self.sd13x_GE(name, hue=0)
- load_bitmap(GE_Graph::Graphics_Folder, name, hue)
- end
- end
- #===============================================================================
- class Window_MenuCommand < Window_Command
- #===============================================================================
- #--------------------------------------------------------------------------
- # Add Exit Game to Command List
- #--------------------------------------------------------------------------
- if GE_Graph::Remove_From_Menu
- def add_game_end_command
- end
- end
- end
- #===============================================================================
- class Window_GameEnd < Window_Command
- #===============================================================================
- #--------------------------------------------------------------------------
- # Update Window Position
- #--------------------------------------------------------------------------
- def update_placement
- self.x = 0 - width
- self.y = 0 - height
- end
- #--------------------------------------------------------------------------
- # Create Command List
- #--------------------------------------------------------------------------
- def make_command_list
- for command in GE_Graph::Commands
- add_command(command[1],command[0])
- end
- end
- end
- #==============================================================================
- class SE_CMND_Graphs < Sprite
- #==============================================================================
- #--------------------------------------------------------------------------
- # Create
- #--------------------------------------------------------------------------
- def initialize(set)
- super(nil)
- self.bitmap = Cache.sd13x_GE(set[2], set[4])
- self.x = Graphics.width/2-(self.bitmap.width/2)
- self.opacity = GE_Graph::Opacity[0]
- self.y = set[3]
- self.z = set[5]
- end
- #--------------------------------------------------------------------------
- # Give Up
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # Try Again
- #--------------------------------------------------------------------------
- def update
- super
- if self.opacity < GE_Graph::Opacity[1]
- self.opacity += GE_Graph::Opacity[2]
- end
- end
- end
- #==============================================================================
- class Scene_End < Scene_MenuBase
- #==============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :pausemenu_ptmin_SEND :pre_terminate
- alias :pausemenu_ccmnd_SEND :create_command_window
- #--------------------------------------------------------------------------
- # Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- pausemenu_ccmnd_SEND
- @command_window.set_handler(:continue, method(:return_scene))
- @command_window.set_handler(:to_menu, method(:command_to_menu))
- create_command_images
- end
- #--------------------------------------------------------------------------
- # Create Images
- #--------------------------------------------------------------------------
- def create_command_images
- @cmnd_images = []
- for command in GE_Graph::Commands
- @cmnd_images << SE_CMND_Graphs.new(command)
- end
- @cmnd_images.each {|cmnd| cmnd.opacity = 0}
- end
- #--------------------------------------------------------------------------
- # [Go to Menu] Command
- #--------------------------------------------------------------------------
- def command_to_menu
- Sound.play_ok
- SceneManager.call(Scene_Menu)
- Window_MenuCommand::init_command_position
- end
- #--------------------------------------------------------------------------
- # Pre-Termination Processing
- #--------------------------------------------------------------------------
- def pre_terminate
- pausemenu_ptmin_SEND
- @cmnd_images.each {|cmnd| cmnd.dispose } if @cmnd_images
- end
- #--------------------------------------------------------------------------
- # Update
- #--------------------------------------------------------------------------
- def update
- super
- if @cmnd_images
- counter = 0
- @cmnd_images.each do |cmnd|
- cmnd.opacity = GE_Graph::Opacity[0] if @command_window.index != counter
- counter += 1
- end
- @cmnd_images[@command_window.index].update
- end
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement