#============================================================================
# Zerbu Engine - Title Screen Window Options
#----------------------------------------------------------------------------
# This script allows you to set window options specifically for the title
# screen to customize its appearance.
#============================================================================
#============================================================================
# (module) Title_Screen_Window_Options
#============================================================================
module Title_Screen_Window_Options
ZE_TSWO = {
#------------------------------------------------------------------------
# Options
#------------------------------------------------------------------------
# What font should be used on the title screen?
#------------------------------------------------------------------------
:FONT_FACE => ["VL Gothic", "Verdana", "Arial", "Courier"],
#------------------------------------------------------------------------
# What size should the text be?
#------------------------------------------------------------------------
:FONT_SIZE => 24,
#------------------------------------------------------------------------
# Should the text on the title screen be bold?
#------------------------------------------------------------------------
:FONT_BOLD => false,
#------------------------------------------------------------------------
# Should the text on the title screen be italic?
#------------------------------------------------------------------------
:FONT_ITALIC => false,
#------------------------------------------------------------------------
# Should the text on the title screen have a shadow?
#------------------------------------------------------------------------
:FONT_SHADOW => false,
#------------------------------------------------------------------------
# Should the text on the title screen have an outline?
#------------------------------------------------------------------------
:FONT_OUTLINE => true,
#------------------------------------------------------------------------
# What colour should the outline be? The format to use is:
# [red, green, blue, opacity]
#------------------------------------------------------------------------
:FONT_OUT_COL => [0, 0, 0],
#------------------------------------------------------------------------
# What colour should the text be? The format to use is:
# [red, green, blue, opacity]
#------------------------------------------------------------------------
:TEXT_COL => [255, 255, 255, 255],
#------------------------------------------------------------------------
# This is the Windowskin used on the title screen.
#------------------------------------------------------------------------
:WINDOWSKIN => "Window",
#------------------------------------------------------------------------
# This is the width of the title window. If this is set to 0, the
# default width will be used.
#------------------------------------------------------------------------
:WINDOW_WIDTH => 200,
#------------------------------------------------------------------------
# This is the height of the title window. If this is set to 0, the
# default width will be used.
#------------------------------------------------------------------------
:WINDOW_HEIGHT => 220,
#------------------------------------------------------------------------
# This is the X position of the title window. If this is set to -1, the
# default position will be used.
#------------------------------------------------------------------------
:WINDOW_X => 20,
#------------------------------------------------------------------------
# This is the Y position of the title window. If this is set to -1, the
# default position will be used.
#------------------------------------------------------------------------
:WINDOW_Y => 20,
#------------------------------------------------------------------------
# This is the opacity of the window.
#------------------------------------------------------------------------
:OPACITY => 255,
#------------------------------------------------------------------------
# This is the back opacity of the window.
#------------------------------------------------------------------------
:BACK_OPACITY => 200,
#------------------------------------------------------------------------
# This is the height of the title window commands
#------------------------------------------------------------------------
:ITEM_HEIGHT => 48,
}
end
#============================================================================
# Window_TitleCommand
#============================================================================
class Window_TitleCommand < Window_Command
include Title_Screen_Window_Options
#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias ze_tsto_initialize initialize
def initialize
#---
ze_tsto_initialize
#---
self.windowskin = Cache.system(ZE_TSWO[:WINDOWSKIN])
self.opacity = ZE_TSWO[:OPACITY]
self.back_opacity = ZE_TSWO[:BACK_OPACITY]
#---
end
def item_height
return ZE_TSWO[:ITEM_HEIGHT]
end
#--------------------------------------------------------------------------
# alias method: window_width
#--------------------------------------------------------------------------
alias ze_tswo_window_width window_width
def window_width
#---
if ZE_TSWO[:WINDOW_WIDTH] != 0
return ZE_TSWO[:WINDOW_WIDTH]
else
ze_tswo_window_width
end
#---
end
#--------------------------------------------------------------------------
# alias method: window_width
#--------------------------------------------------------------------------
alias ze_tswo_window_height window_height
def window_height
#---
if ZE_TSWO[:WINDOW_HEIGHT] != 0
return ZE_TSWO[:WINDOW_HEIGHT]
else
ze_tswo_window_height
end
#---
end
#--------------------------------------------------------------------------
# method: change_color
#--------------------------------------------------------------------------
def change_color(color, enabled = true)
r = ZE_TSWO[:TEXT_COL][0]
g = ZE_TSWO[:TEXT_COL][1]
b = ZE_TSWO[:TEXT_COL][2]
a = ZE_TSWO[:TEXT_COL][3]
contents.font.color.set(r, g, b)
contents.font.color.alpha = enabled ? a == nil ? 255 : a : translucent_alpha
end
#--------------------------------------------------------------------------
# alias method: draw_item
#--------------------------------------------------------------------------
alias ze_tswo_draw_item draw_item
def draw_item(index)
#---
contents.font.name = ZE_TSWO[:FONT_FACE]
contents.font.size = ZE_TSWO[:FONT_SIZE]
contents.font.bold = ZE_TSWO[:FONT_BOLD]
contents.font.italic = ZE_TSWO[:FONT_ITALIC]
contents.font.shadow = ZE_TSWO[:FONT_SHADOW]
contents.font.outline = ZE_TSWO[:FONT_OUTLINE]
contents.font.out_color = Color.new(ZE_TSWO[:FONT_OUT_COL][0], ZE_TSWO[:FONT_OUT_COL][1], ZE_TSWO[:FONT_OUT_COL][2])
#---
ze_tswo_draw_item(index)
#---
end
#--------------------------------------------------------------------------
# overwrite method: update_placement
#--------------------------------------------------------------------------
def update_placement
#---
if ZE_TSWO[:WINDOW_X] != -1
self.x = ZE_TSWO[:WINDOW_X]
else
self.x = (Graphics.width - width) / 2
end
#---
if ZE_TSWO[:WINDOW_Y] != -1
self.y = ZE_TSWO[:WINDOW_Y]
else
self.y = (Graphics.height * 1.6 - height) / 2
end
#---
end
end