#==============================================================================
# ** Window_SaveFile
#------------------------------------------------------------------------------
# This window displays save files on the save and load screens.
#==============================================================================
class Window_SaveFile < Window_Base
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
Chapter_Image_Dir = 'Graphics/Pictures/'
#------------------------------------------------------------------------
# - Chapter_Names
# This Hash holds each chapter name in incremental order. Feel free
# to change the strings or add to it when ever you want. The string
# that the chapter name string points to is the filename of the image
# to show. The default is the file name of the picture to show if an
# image can not be loaded properly.
#------------------------------------------------------------------------
Chapter_Names = [
['Prelude', 'prelude'],
['Chapter 1', 'chapter1'],
['Chapter 2', 'chapter2'],
['Chapter 3', 'chapter3'],
['Chapter 4', 'chapter4'],
['Chapter 5', 'chapter5'],
]
#------------------------------------------------------------------------
# - Chapter_Name_Variable
# This variable is used to indicate what $game_variable index holds
# the current chapter name. You may change it to whatever you wish.
#------------------------------------------------------------------------
Chapter_Name_Variable = 1
#--------------------------------------------------------------------------
# * Refresh !OVERRIDE!
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
name = Vocab::File + " #{@file_index + 1}"
self.contents.draw_text(4, 0, 200, WLH, name)
@name_width = contents.text_size(name).width
if @file_exist
unless Chapter_Names[@game_variables[Chapter_Name_Variable]].nil?
# The name of the chapter.
chapter_name =
Chapter_Names[@game_variables[Chapter_Name_Variable]][0]
# The image file name of the chapter.
chapter_image =
Chapter_Names[@game_variables[Chapter_Name_Variable]][1]
# The bitmap of the chapter's image.
chapter_bitmap = Bitmap.new(Chapter_Image_Dir + chapter_image)
# Draw the chapter name.
self.contents.draw_text(0, 0, width - 32, WLH, chapter_name, 1)
# Draw the chapter image.
self.contents.blt(60, 0, chapter_bitmap, Rect.new(0, 0, 24, 24))
end
draw_party_characters(152, 58)
draw_playtime(0, 34, contents.width - 4, 2)
end
end
end