=begin
One Character Menu
by The Infamous Bon Bon
Free to use commercially or non-commercially with credit
The only necessary changes are in Window_MenuCommand and Scene_Menu. If you
have another Window_MenuStatus that you prefer to use, you can just remove this
one.
=end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# --Overwrite Method--
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.members[index]
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)
#--New stuff added to window---------------------------------------------
draw_horz_line(rect.y + line_height * 4)
draw_exp_info(actor, rect.x, rect.y + line_height * 5, contents.width)
draw_horz_line(rect.y + line_height * 6)
draw_parameters(actor, rect.x + 24, rect.y + line_height * 7,
contents.width / 2 - 50)
draw_equipments(actor, rect.x + contents.width / 2, rect.y + line_height * 7,
contents.width / 2 - 30)
draw_horz_line(rect.y + line_height * 13)
draw_description(actor, rect.x, rect.y + line_height * 14)
#------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# All of this is was added to make it possible to add the new stuff to the
# Window. If you remove the new stuff, you can remove this stuff as well
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# --New Method--
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters(actor, x, y, width)
6.times {|i| draw_actor_param(actor, x, y + line_height * i, i + 2, width) }
end
#--------------------------------------------------------------------------
# --New Method--
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_actor_param(actor, x, y, param_id, width)
change_color(system_color)
draw_text(x, y, width, line_height, Vocab:😛aram(param_id))
change_color(normal_color)
draw_text(x, y, width, line_height, actor.param(param_id), 2)
end
#--------------------------------------------------------------------------
# --New Method--
# * Draw Experience Information
#--------------------------------------------------------------------------
def draw_exp_info(actor, x, y, width)
s1 = actor.max_level? ? "-------" : actor.exp
s2 = actor.max_level? ? "-------" : actor.next_level_exp - actor.exp
s_next = sprintf(Vocab::ExpNext, Vocab::level)
change_color(system_color)
draw_text(x, y + line_height * 0, width, line_height, Vocab::ExpTotal)
change_color(normal_color)
draw_text(x, y + line_height * 0, width, line_height, s1, 2)
end
#--------------------------------------------------------------------------
# --New Method--
# * Draw Equipment
#--------------------------------------------------------------------------
def draw_equipments(actor, x, y, width)
actor.equips.each_with_index do |item, i|
draw_item_name(item, x, y + line_height * i, true, width)
end
end
#--------------------------------------------------------------------------
# --New Method--
# * Draw Description
#--------------------------------------------------------------------------
def draw_description(actor, x, y)
draw_text_ex(x, y, actor.description)
end
#--------------------------------------------------------------------------
# --New Method--
# * Draw Horizontal Line
#--------------------------------------------------------------------------
def draw_horz_line(y)
line_y = y + line_height / 2 - 1
contents.fill_rect(0, line_y, contents_width, 2, line_color)
end
#--------------------------------------------------------------------------
# --New Method--
# * Get Color of Horizontal Line
#--------------------------------------------------------------------------
def line_color
color = normal_color
color.alpha = 48
color
end
end #class Window_MenuStatus < Window_Selectable
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# --Overwrite Method--
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_main_commands
add_original_commands
add_save_command
add_game_end_command
end
#--------------------------------------------------------------------------
# --Overwrite Method--
# * Add Main Commands to List
#--------------------------------------------------------------------------
def add_main_commands
add_command(Vocab::item, :item, main_commands_enabled)
add_command(Vocab::skill, :skill, main_commands_enabled)
add_command(Vocab::equip, :equip, main_commands_enabled)
end
end #class Window_MenuCommand < Window_Command
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# --Overwrite Method--
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler🙂item, method🙂command_item))
@command_window.set_handler🙂skill, method🙂command_skill))
@command_window.set_handler🙂equip, method🙂command_equip))
@command_window.set_handler🙂save, method🙂command_save))
@command_window.set_handler🙂game_end, method🙂command_game_end))
@command_window.set_handler🙂cancel, method🙂return_scene))
end
#--------------------------------------------------------------------------
# --New Method--
# * [skill] Command
#--------------------------------------------------------------------------
def command_skill
SceneManager.call(Scene_Skill)
end
#--------------------------------------------------------------------------
# --New Method--
# * [Equip] Command
#--------------------------------------------------------------------------
def command_equip
SceneManager.call(Scene_Equip)
end
end #class Scene_Menu < Scene_MenuBase