Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # 「Portrait Focus Background」(ACE) Ver.1.0
- # Author: Nana
- # Homepage: http://heptanas.mamagoto.com/
- #
- # ◇Terms of Use
- # Please credit "Nana."
- # Feel free to modify this script and/or distribute it.
- # Also please include the credit in the readme or somewhere it's accessible. (Not from credit roll)
- # Check the blog for detailed terms of use.
- #
- #------------------------------------------------------------------------------
- #
- # Capture the background of the map screen (also a background of the menu)
- # Which is displayed behind the window and picture before the map screen.
- #
- # Using windows and pictures, you can express things with menu screens.
- # Also you can change the blur and color.
- #
- # [How to use]
- # Use "Script" from the Event Commands
- #
- # n7_create_background create a background
- # n7_dispose_background remove a background
- #
- # n7_create_background(blur, [R, G, B, alpha])
- # blur:true/false to set blur
- # [R, G, B, alpha]: to set color through 0~255 RGB color code
- #
- #==============================================================================
- #==============================================================================
- # ■ Scene_Map
- #------------------------------------------------------------------------------
- # Scene Map Process
- #==============================================================================
- class Scene_Map < Scene_Base
- #--------------------------------------------------------------------------
- # ● Create background
- #--------------------------------------------------------------------------
- def create_background(blur, color)
- @background_sprite = Sprite.new
- @background_sprite.bitmap = Graphics.snap_to_bitmap
- @background_sprite.bitmap.blur if blur
- @background_sprite.color.set(color)
- end
- #--------------------------------------------------------------------------
- # ● Dispose background
- #--------------------------------------------------------------------------
- def dispose_background
- @background_sprite.dispose
- end
- #--------------------------------------------------------------------------
- # ● Dispose spriteset
- #--------------------------------------------------------------------------
- alias dispose_spriteset_bg dispose_spriteset
- def dispose_spriteset
- dispose_spriteset_bg
- @background_sprite.dispose if @background_sprite
- end
- end
- #==============================================================================
- # ■ Game_Interpreter
- #------------------------------------------------------------------------------
- # Game interpreter for classes like Game_Map,
- # Game_Troop、and Game_Event.
- #==============================================================================
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # ● Create background
- #--------------------------------------------------------------------------
- def n7_create_background(blur = true, rgba = [16, 16, 16, 128])
- SceneManager.scene.create_background(blur, Color.new(*rgba))
- end
- #--------------------------------------------------------------------------
- # ● Dispose background
- #--------------------------------------------------------------------------
- def n7_dispose_background
- SceneManager.scene.dispose_background
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement