Thread Rating:
  • 2 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 My Windowskins
#3
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
Reply }


Messages In This Thread
My Windowskins - by chickendips - 02-20-2010, 02:01 PM
My Windowskins - by chickendips - 02-20-2010, 02:03 PM
My Windowskins - by chickendips - 02-20-2010, 02:07 PM
My Windowskins - by chickendips - 02-20-2010, 02:12 PM
My Windowskins - by Ace - 02-20-2010, 03:43 PM
My Windowskins - by chickendips - 02-21-2010, 04:55 PM
My Windowskins - by chickendips - 02-21-2010, 08:19 PM
My Windowskins - by Mega Flare - 02-26-2010, 05:55 PM
My Windowskins - by chickendips - 02-26-2010, 05:59 PM
My Windowskins - by chickendips - 02-26-2010, 06:54 PM
My Windowskins - by Mega Flare - 02-26-2010, 06:55 PM
My Windowskins - by deValdr - 02-26-2010, 06:56 PM
My Windowskins - by DerVVulfman - 02-26-2010, 07:50 PM
My Windowskins - by jubhub731 - 02-26-2010, 07:54 PM
My Windowskins - by chickendips - 02-26-2010, 07:55 PM
My Windowskins - by chickendips - 02-28-2010, 02:15 PM
My Windowskins - by kyonides - 03-01-2010, 12:08 AM
My Windowskins - by Mega Flare - 03-01-2010, 04:42 AM



Users browsing this thread: