Gabriel_Nascimento

** Esteem [Código Rápido] - Change Windowskin

Jun 8th, 2018
120
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #==============================================================================
  2. # ** Esteem [Código Rápido] - Change Windowskin
  3. #==============================================================================
  4. # ► Script por: Skyloftian
  5. #------------------------------------------------------------------------------
  6. # ► Atualizações: 08/06/18 v1.0 Concluído
  7. #==============================================================================
  8. # ► Descrição: Esse é um código simples para trocar a windowskin a qualquer
  9. # momento através do comando Chamar Script (Script Call).
  10. #==============================================================================
  11. # ► Intruções de Uso: Para alterar a windowskin a qualquer momento, basta em
  12. # um evento chamar o seguinte código através do comando Chamar Script:
  13. #
  14. # esteem_change_windowskin("nome_da_windowskin")
  15. #
  16. # Lembrando que as windowskins devem estar na pasta Graphics/System.
  17. #==============================================================================
  18. # ► Início do Código | Não mude nada caso não entenda
  19. #==============================================================================
  20. class Window_Base < Window
  21.  
  22.   alias :esteem_cw_wb_init :initialize
  23.   def initialize(x, y, width, height)
  24.     esteem_cw_wb_init(x, y, width, height)
  25.     self.windowskin = Cache.system($game_system.windowskin)
  26.   end
  27.  
  28.   alias :esteem_cw_wb_up :update
  29.   def update
  30.     esteem_cw_wb_up
  31.     self.windowskin = Cache.system($game_system.windowskin) if self.windowskin != Cache.system($game_system.windowskin)
  32.   end
  33.  
  34. end # Window_Base
  35. class Game_System
  36.  
  37.   attr_accessor :windowskin
  38.  
  39.   alias :esteem_cw_gs_init :initialize
  40.   def initialize
  41.     esteem_cw_gs_init
  42.     @windowskin = "Window"
  43.   end
  44.  
  45. end # Game_System
  46. class Game_Interpreter
  47.  
  48.   def esteem_change_windowskin(windowskin_name)
  49.     $game_system.windowskin = windowskin_name
  50.   end
  51.  
  52. end # Game_Interpreter
RAW Paste Data