# New script:
class Window_TitleCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# width : window width
# commands : command text string array
#--------------------------------------------------------------------------
def initialize(commands)
width = commands.size * 130
super(640 / 2 - width / 2, 288, width, 64)
@item_max = commands.size
@commands = commands
@column_max = 3
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
# color : text color
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4 + 130*index, 0, self.contents.width/@commands.size - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# * Disable Item
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
# Scene_Title Modification: change this:
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# to this:
@command_window = Window_TitleCommand.new([s1, s2, s3])
I hope it works, I did not tested it.