02-20-2010, 02:07 PM
Dont want the windowskin background to stretch but tile instead?
Code:
#==============================================================================
#????Window Base Edit ver. 1.10???
#??Script by ParaDog
#??http://2d6.parasite.jp/
#------------------------------------------------------------------------------
# Allows editing of the font, text color and tiling of the window backgrounds.
#------------------------------------------------------------------------------
# ?Installation?
# Insert below Scene_Debug
#==============================================================================
module PARA_WINDOW_CUSTOM
# Tile/Stretch setting for the window background ? true/false ?
SKIN_TILING = true
# Opacity of message window
BACK_OPACITY = 160
# Normal text color
COLOR_NORMAL = Color.new(255, 255, 255, 255)
# Disabled text color
COLOR_DISABLED = Color.new(255, 255, 255, 128)
# System text color
COLOR_SYSTEM = Color.new(192, 224, 255, 255)
# Crisis text color
COLOR_CRISIS = Color.new(255, 255, 64, 255)
# Knockout text color
COLOR_KNOCKOUT = Color.new(255, 64, 0, 255)
# Message code "\C[n]" determines which color setting is used.
# Syntax: COLOR_SET[n] = Color.new(red, green, blue, opacity) where 'n' = 0-7
COLOR_SET=[] # Please do not delete this line
COLOR_SET[0] = Color.new(255, 255, 255, 255)
COLOR_SET[1] = Color.new(128, 128, 255, 255)
COLOR_SET[2] = Color.new(255, 128, 128, 255)
COLOR_SET[3] = Color.new(128, 255, 128, 255)
COLOR_SET[4] = Color.new(128, 255, 255, 255)
COLOR_SET[5] = Color.new(255, 128, 255, 255)
COLOR_SET[6] = Color.new(255, 255, 128, 255)
COLOR_SET[7] = Color.new(192, 192, 192, 255)
# Fontname(s)
# Can hold multiple fonts if separated with ",". Ex: ["Arial","MS Mincho"] )
FONT_NAME = ["Times New Roman", "MS Mincho"]
FONT_SIZE = 22 # The default font size
FONT_BOLD = false # Bolded text? ?true/false?
FONT_ITALIC = false # Italicized text? ?true/false?
end
# End of the config section
#------------------------------------------------------------------------------
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
Font.default_color = PARA_WINDOW_CUSTOM::COLOR_NORMAL
Font.default_name = PARA_WINDOW_CUSTOM::FONT_NAME + ["MS PGothic"]
Font.default_size = PARA_WINDOW_CUSTOM::FONT_SIZE
Font.default_bold = PARA_WINDOW_CUSTOM::FONT_BOLD
Font.default_italic = PARA_WINDOW_CUSTOM::FONT_ITALIC
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias initialize_para_window_custom initialize
def initialize(x, y, width, height)
initialize_para_window_custom(x, y, width, height)
self.stretch = !(PARA_WINDOW_CUSTOM::SKIN_TILING)
end
#--------------------------------------------------------------------------
# * Get Text Color
# n : text color number (0-7)
#--------------------------------------------------------------------------
def text_color(n)
return PARA_WINDOW_CUSTOM::COLOR_SET[n]
end
#--------------------------------------------------------------------------
# * Get Normal Text Color
#--------------------------------------------------------------------------
def normal_color
return PARA_WINDOW_CUSTOM::COLOR_NORMAL
end
#--------------------------------------------------------------------------
# * Get Disabled Text Color
#--------------------------------------------------------------------------
def disabled_color
return PARA_WINDOW_CUSTOM::COLOR_DISABLED
end
#--------------------------------------------------------------------------
# * Get System Text Color
#--------------------------------------------------------------------------
def system_color
return PARA_WINDOW_CUSTOM::COLOR_SYSTEM
end
#--------------------------------------------------------------------------
# * Get Crisis Text Color
#--------------------------------------------------------------------------
def crisis_color
return PARA_WINDOW_CUSTOM::COLOR_CRISIS
end
#--------------------------------------------------------------------------
# * Get Knockout Text Color
#--------------------------------------------------------------------------
def knockout_color
return PARA_WINDOW_CUSTOM::COLOR_KNOCKOUT
end
end
#==============================================================================
# ** Window_Message
#------------------------------------------------------------------------------
# This message window is used to display text.
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# * Set Window Position and Opacity Level
#--------------------------------------------------------------------------
alias reset_window_para_window_custom reset_window
def reset_window
reset_window_para_window_custom
self.back_opacity = PARA_WINDOW_CUSTOM::BACK_OPACITY
end
end