The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: worale on March 09, 2008, 09:21:46 PM

Title: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: worale on March 09, 2008, 09:21:46 PM
Change Windowskin
Version 1.0
by Woratana
Release Date: 10/03/2008


Introduction
This is a small snippet to change your windowskin by call script~  :wink:


Features
Version 1.0
- Easy to change you windowskin by just call script.


Script
Place it above main
Spoiler for:
Code: [Select]
#===============================================================
# ? [VX Snippet] ? Change Windowskin ? ?
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Released on: 10/03/2008
#--------------------------------------------------------------
# Note: Missing features from RM2K and RMXP
=begin
?----?----?----?----? +[How to use]+ ?----?----?----?----?
Call script:
$game_system.skin = 'Windowskin File Name'
(Window Skin file must be in folder 'Graphics/System')

For Example >> $game_system.skin = 'Window'
?=====?=====?=====?=====?=====?=====?=====?=====?=====?

=end
#===============================================================

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 = 'Window'
  end
end


Instruction
Change your windowskin by call script:
Code: [Select]
$game_system.skin = 'Windowskin File Name'
(Window Skin file must be in folder 'Graphics/System')

For Example >>
Code: [Select]
$game_system.skin = 'Window'


Author's Notes
Free for use in your non-commercial work if credit included. If your project is commercial, please contact me.

Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: modern algebra on March 10, 2008, 01:34:39 AM
Nice and useful. Good job.
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: Raiden on January 19, 2009, 07:14:50 PM
Where do i get Windowskins?  :P
Thanks,
-Raiden :D
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: Holkeye on January 19, 2009, 09:06:33 PM
Holy shit, man. Why not ask the same question in three threads? That won't be annoying, right?
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: Raiden on January 19, 2009, 09:42:44 PM
Holy shit, man. Why not ask the same question in three threads? That won't be annoying, right?
Lol, just trying to get answers as quick as possible! :D ;8
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: Holkeye on January 19, 2009, 09:45:42 PM
It's part of the rules here. Don't do it again.
Title: Re: Change Windowskin - [Missing Features from RM2K and RMXP]
Post by: Raiden on January 21, 2009, 01:32:24 AM
It's part of the rules here. Don't do it again.
. Ok, sorry.