Advertisement
AngryPacman

PAC Opacity

Jul 29th, 2011
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.64 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Pacman Advanced Creative (PAC) Engine - Opacity
  4. # 6/6/2011
  5. # Type: Main
  6. # Installation: Optional values, arrays.
  7. # Level: Simple
  8. #
  9. #===============================================================================
  10. #
  11. # Description:
  12. # This script lets you choose certain scenes to edit the opacity of, simply.
  13. # Really, it does nothing else.
  14. #
  15. #===============================================================================
  16. #
  17. # Instructions:
  18. # INSTALLATION
  19. # Paste above main, below materials, as per usual.
  20. # CONFIGURATION
  21. # OPA_SCENES is an array in which you enter the class of the scenes you want
  22. # to change the opacity of. Use commas to separate classes.
  23. # NEW_OPACITY is the, well, new opacity that you are giving the scenes in
  24. # OPA_SCENES.
  25. # NEW_BACK_OPACITY is the background opacity of the scenes in OPA_SCENES.
  26. # I've trusted you enough not to touch the rest of the script by not making a
  27. # warning section, because it's only like 3 lines anyway.
  28. #
  29. #===============================================================================
  30.  
  31. module PAC
  32.   module MAIN
  33.     OPA_SCENES = [Scene_Menu, Scene_Item, Scene_Skill, Scene_Status, Scene_File,
  34.     Scene_Equip, Scene_Party, Scene_End, Scene_Title, Scene_Battle, Scene_Map,
  35.     Scene_Shop, Scene_Name, Scene_Debug, Scene_Gameover]
  36.     NEW_OPACITY = 120
  37.     NEW_BACK_OPACITY = 255
  38.   end
  39. end
  40.  
  41. #==============================================================================
  42. # ** Window_Base
  43. #------------------------------------------------------------------------------
  44. #  This is a superclass of all windows in the game.
  45. #==============================================================================
  46.  
  47. class Window_Base
  48.   #--------------------------------------------------------------------------
  49.   # alias listing
  50.   #--------------------------------------------------------------------------
  51.   alias pac_opacity_ini initialize
  52.   #--------------------------------------------------------------------------
  53.   # * Object Initialization
  54.   #--------------------------------------------------------------------------
  55.   def initialize(*args)
  56.     pac_opacity_ini(*args)
  57.     if PAC::MAIN::OPA_SCENES.include?($scene.class)
  58.       self.opacity = PAC::MAIN::NEW_OPACITY
  59.       self.back_opacity = PAC::MAIN::NEW_BACK_OPACITY
  60.     end
  61.   end
  62. end
  63.  
  64. unless $imported != nil
  65.   $imported = {}
  66. end
  67. $imported["PAC_Opacity"] = true
  68.  
  69. #===============================================================================
  70. #
  71. # END OF SCRIPT
  72. #
  73. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement