Posts: 117
Threads: 3
Joined: May 2009
Posts: 117
Threads: 3
Joined: May 2009
Posts: 117
Threads: 3
Joined: May 2009
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
Posts: 117
Threads: 3
Joined: May 2009
want to include a cursor infront of the selection?
script:
Code: #==============================================================================
#????Arrow-Type Selection Cursor?ver. 1.12???
#??Script by ParaDog
#??http://2d6.parasite.jp/
#------------------------------------------------------------------------------
# Uses an optional picture for the cursor in command selection windows.
#==============================================================================
module PARA_LEFT_CURSOR
# Name of the cursor file (in the "Graphics/Windowskin" folder)
FILE_NAME = "cursor"
# Cursor type ? 0: Arrow / 1: Arrow & Rect Border ?
TYPE = 0
end
# End of the config section
#------------------------------------------------------------------------------
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
alias cursor_rect_para_lcr cursor_rect
def cursor_rect=(rect)
if PARA_LEFT_CURSOR::TYPE == 1
super(rect)
end
empty = Rect.new(0,0,0,0)
if rect != empty and self.visible != false and @index != -1
if @cursor == nil or @cursor.disposed?
# Draw the sprite
@cursor = Sprite.new
@cursor.bitmap = RPG::Cache.windowskin(PARA_LEFT_CURSOR::FILE_NAME)
end
# Move the position of cursor sprite
@cursor.x = self.x + rect.x
cy = (rect.height-32) / 2
@cursor.y = self.y + cy + rect.y + 16
@cursor.z = self.z + 2
elsif @cursor != nil
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
alias dispose_para_cur dispose
def dispose
super
if @cursor != nil
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# * self.visible
#--------------------------------------------------------------------------
def visible=(bool)
super
# Dispose if cursor and window contents bit map is set
if @cursor != nil and bool == false
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# * self.x
#--------------------------------------------------------------------------
def x=(x)
super
if @index != nil
# Update cursor rectangle
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# * self.y
#--------------------------------------------------------------------------
def y=(y)
super
if @index != nil
# Update cursor rectangle
update_cursor_rect
end
end
end
animation add-on (need script above):
Code: #==============================================================================
#??? Arrow-Type Selection Cursor - Animated Cursor ver. 1.00 ??
#??Script by ParaDog
#??http://2d6.parasite.jp/
#------------------------------------------------------------------------------
# An optional add-on for the "Arrow-Type Selection Cursor" script.
#------------------------------------------------------------------------------
# Uses the same cursor filename in the "Arrow-Type Selection Cursor" script for
# the individual files. If the cursor filename is 'hand' and the system is set
# for a 3 frame animation, the images used would be: hand1, hand2 and hand3
# to create the animated cursor.
#==============================================================================
module PARA_LEFT_CURSOR
# The number of images used in the cursor's animation
MAX_FRAMES = 3
# Animation delay speed.
# Smaller values decrease speed between animation frames (ie faster animation)
ANM_SPEED = 5
end
# End of the config section
#------------------------------------------------------------------------------
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
alias cursor_rect_para_lcr cursor_rect
def cursor_rect=(rect)
if PARA_LEFT_CURSOR::TYPE == 1
super(rect)
end
empty = Rect.new(0,0,0,0)
if rect != empty and self.visible != false and @index != -1
if @cursor == nil or @cursor.disposed?
# Draw the sprite
@cursor = Sprite.new
@cursor_anm_frame = 1
@cursor.bitmap = RPG::Cache.windowskin(PARA_LEFT_CURSOR::FILE_NAME+@cursor_anm_frame.to_s)
@cursor_wait = PARA_LEFT_CURSOR::ANM_SPEED
end
# Moving the position of cursor sprite
@cursor.x = self.x + rect.x
cy = (rect.height-32) / 2
@cursor.y = self.y + cy + rect.y + 16
@cursor.z = self.z + 2
elsif @cursor != nil
@cursor.dispose
end
end
#--------------------------------------------------------------------------
# * Frame update
#--------------------------------------------------------------------------
def update
super
if @cursor != nil and @cursor.disposed? == false
if @cursor_wait == nil or @cursor_wait <= 0
@cursor_wait = PARA_LEFT_CURSOR::ANM_SPEED
@cursor_anm_frame += 1
if @cursor_anm_frame > PARA_LEFT_CURSOR::MAX_FRAMES
@cursor_anm_frame = 1
end
@cursor.bitmap = RPG::Cache.windowskin(PARA_LEFT_CURSOR::FILE_NAME+@cursor_anm_frame.to_s)
else
@cursor_wait -= 1
end
end
end
end
default cursor
black(by me)
white(by me)
Posts: 867
Threads: 15
Joined: Nov 2009
Cool, I will use the tile stretching and the animated cursor.
thx for that
Posts: 117
Threads: 3
Joined: May 2009
here are some new ones i worked on:
:)
Posts: 117
Threads: 3
Joined: May 2009
just squeezing in 2 more for now. ^_^;
Posts: 24
Threads: 4
Joined: Feb 2010
jesus christ your good dips <3 :p
Posts: 117
Threads: 3
Joined: May 2009
Posts: 117
Threads: 3
Joined: May 2009
2 new ones i just worked on today :)
|