Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [VX Snippet] Change Windowskin, [Missing Features from RM2K and RMXP]
woratana
post Mar 9 2008, 02:07 PM
Post #1


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




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
CODE
#===============================================================
# ● [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
$game_system.skin = 'Windowskin File Name'

(Window Skin file must be in folder 'Graphics/System')

For Example >>
CODE
$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.


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
lahandi
post Mar 9 2008, 05:34 PM
Post #2


Level 8
Group Icon

Group: Revolutionary
Posts: 111
Type: Artist
RM Skill: Skilled




Mr. Woratana,

After we use this as a several dialogue text background, how can we change it again to default? Should we call again the default windowskin by $game_system.skin = '(default windowkin name)' or we use something like true/false statement?

Thank you smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
woratana
post Mar 9 2008, 06:59 PM
Post #3


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Yeah, just call

QUOTE
$game_system.skin = 'Window'


smile.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 04:17 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker