Translate:

Parceiros:

Search:

5 de ago. de 2013

Script trocar windowskin do jogo.

class Window_Base < Window
  alias wor_changeskin_winbase_ini initialize
  alias wor_changeskin_winbase_upd update
  
  # Change Window Skin when first call Window
  def initialize(x, y, width, height)
    wor_changeskin_winbase_ini(x, y, width, height)
    self.windowskin = Cache.system($game_system.skin)
    @winskin = $game_system.skin
  end
  
  # Change Window Skin if $game_system.skin is not same as its skin
  def update
    wor_changeskin_winbase_upd
    if @winskin != $game_system.skin
      self.windowskin = Cache.system($game_system.skin)
      @winskin = $game_system.skin
    end
  end
end
class Game_System
  attr_accessor :skin
  alias wor_changeskin_gamesys_ini initialize
  
  # Add variable $game_system.skin to store/change windowskin file name
  def initialize
    wor_changeskin_gamesys_ini
    @skin = 'window1'
  end
end


OBS:  @skin = 'window1' entre o parêntese coloque o nome da windowskin importada. 

Nenhum comentário:

Postar um comentário

Curta nossa página no Facebook: