Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ Nio Kasgami Engine Ace "Simple Menu Background control"
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Kill those damn Blur in the Menu!
- # Created by Nio Kasgami.
- # Data : 2015/09/3
- # Version : 1.0.0
- #==============================================================================
- #==============================================================================
- # Terms of use
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # for games usage :
- # you have the right to use my system in your games for commercial and
- # non-commercial games
- # you must credit me
- #
- # for scripts usage :
- # You have the right to use and edit my script in your system.
- # but you have to leave the headers unchanged and non-mixed with
- # your current scripts. if you decide to share your script to the public
- # E.G : Merge my scripts with your scripts.
- # {Overwriting method is not count as merge}
- #
- # you must credit me in your scripts if you use my scripts as base
- #
- # you don't have the right to redistribute my scripts {non-edit}
- # if you want share the thread link.
- #
- # if you want to use my script as a base for a commercial script,
- # please contact me first
- #==============================================================================
- #==============================================================================
- # History
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # 2015/05/24 - Begin and finishing the scripts
- #==============================================================================
- #==============================================================================
- # Introduction
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Did you ever wanted to modify the background in your menu but don't wanted
- # to use complicate big Menu Engine? Then this script is perfect for you!
- #==============================================================================
- module Nio
- module Blur_Killer
- System ={
- # true = no blur
- # false = blur
- :kill_blur => true,
- # true = Allow color modification
- # false = Disallow color modification
- :enable_color_set => false,
- # set the color (only if enable_color => true)
- # [red,green,blue,alpha],
- :set_color => [16, 16, 16, 128],
- # set the background type
- # :default = normal map snapshot
- # :custom = custom picture for background
- :background_type => :custom,
- # set the filename of the background (only if :custom)
- # must be place in Graphics/System
- :bitmap => "Book"
- }
- end
- end
- #==============================================================================
- # ■ SceneManager
- #------------------------------------------------------------------------------
- # This module manages scene transitions. For example, it can handle
- # hierarchical structures such as calling the item screen from the main menu
- # or returning from the item screen to the main menu.
- #==============================================================================
- module SceneManager
- #----------------------------------------------------------------------------
- # ● overwrite method: snapshot_for_background
- #----------------------------------------------------------------------------
- def self.snapshot_for_background
- @background_bitmap.dispose if @background_bitmap
- @background_bitmap = Graphics.snap_to_bitmap
- if !Nio::Blur_Killer::System[:kill_blur]
- @background_bitmap.blur
- end
- end
- end
- #===============================================================================
- # => END : SceneManager
- #===============================================================================
- #==============================================================================
- # ■ Scene_MenuBase
- #------------------------------------------------------------------------------
- # This class performs basic processing related to the menu screen.
- #==============================================================================
- class Scene_MenuBase < Scene_Base
- include Nio::Blur_Killer
- #----------------------------------------------------------------------------
- # ● overwrite method: create_background
- #----------------------------------------------------------------------------
- def create_background
- case System[:background_type]
- when :default
- bitmap = SceneManager.background_bitmap
- when :custom
- bitmap = Cache.system(System[:bitmap])
- end
- @background_sprite = Sprite.new
- @background_sprite.bitmap = bitmap
- if System[:enable_color_set]
- red = System[:set_color][0]
- green = System[:set_color][1]
- blue = System[:set_color][2]
- alpha = System[:set_color][3]
- @background_bitmap.color.set(red,green,blue,alpha)
- end
- end
- end
- #===============================================================================
- # => END : Scene_MenuBase
- #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement