Here you go.
module KPMH_Settings
ACTOR_PICTURES ={
# Actor ID => Filename
1 => "Ralph",
2 => "Ralph",
3 => "Ralph",
4 => "Ralph",
}
PICTURE_Y_OFFSET = 16
CLASS_Y_OFFSET = 32
CURSOR_WIDTH = 136
CURSOR_HEIGHT = 130
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a superclass of all windows in the game.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Image
# filename : filename
# face_index : Face graphic index
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# size : Display size
#--------------------------------------------------------------------------
def draw_image(filename, x, y)
bitmap = Cache.picture(filename)
rect = Rect.new(0, 0, 0, 0)
rect.width = bitmap.width
rect.height = bitmap.height
self.contents.blt(x, y, bitmap, rect)
bitmap.dispose
end
end
#==============================================================================
# Window_HMS
#------------------------------------------------------------------------------
# Janela que exibe os status dos membros da equipe no menu.
#==============================================================================
class Window_HMS < Window_Selectable
#--------------------------------------------------------------------------
# Atualização
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
create_contents
# Define @fw (face width: largura da face) para organização
for actor in $game_party.members
# Exibição dos nomes dos personagens
self.contents.font.color = system_color
@cell_size
self.contents.font.name = KPMH_Settings::MENU_FONT
self.contents.draw_text(actor.index * @cell_size, 0, @cell_size, WLH,
actor.name, 1)
# Exibição dos arquivos de faces dos personagens
if KPMH_Settings::STATUS_WINDOW_MODE == 0 ||
KPMH_Settings::STATUS_WINDOW_MODE == 2
draw_image(KPMH_Settings::ACTOR_PICTURES[actor.id], actor.index * (544 / 4), KPMH_Settings::PICTURE_Y_OFFSET)
end
# Exibição dos gráficos dos personagens
if KPMH_Settings::STATUS_WINDOW_MODE == 1
draw_character(actor.character_name, actor.character_index,
actor.index * @cell_size + @cell_size / 2, WLH + 64)
end
if KPMH_Settings::STATUS_WINDOW_MODE == 2
x = @column_max > 4 ? actor.index * @cell_size + 20 : actor.index *
@cell_size + @cell_size / 2 - 34
y = @column_max > 4 ? WLH + 5 + (96 - @cell_size) / 2 +
@cell_size - 8 - 4 : WLH + 94
draw_character(actor.character_name, actor.character_index, x, y)
end
# Exibição das classes dos personagens
self.contents.font.color = normal_color
self.contents.draw_text(actor.index * @cell_size, 96 + WLH + KPMH_Settings::CLASS_Y_OFFSET, @cell_size,
WLH, actor.class.name, 1)
# Exibição do estado físico dos personagens
draw_actor_state(actor, actor.index * @cell_size, WLH * 2 + 96,
@cell_size)
# Exibição da nível dos personagens
draw_actor_exp(actor, actor.index * @cell_size, WLH * 3 + 96,
@cell_size - 8)
# Exibição do HP dos personagens
draw_actor_hp(actor, actor.index * @cell_size, WLH * 5 + 96,
@cell_size - 8)
# Exibição do MP dos personagens
draw_actor_mp(actor, actor.index * @cell_size, WLH * 6 + 96,
@cell_size - 8)
end
end
#--------------------------------------------------------------------------
# Atualização do cursor
#--------------------------------------------------------------------------
def update_cursor
index = @index - @index_increment
if !self.active # Sem cursor
self.cursor_rect.empty
elsif index < @item_max # Padrão
self.cursor_rect.set(index * @cell_size, WLH, KPMH_Settings::CURSOR_WIDTH, KPMH_Settings::CURSOR_HEIGHT)
elsif index >= 100 # Si
self.cursor_rect.set((index - 100) * @cell_size, WLH, KPMH_Settings::CURSOR_WIDTH, KPMH_Settings::CURSOR_HEIGHT)
else # O todo
self.cursor_rect.set(0, WLH, @item_max * KPMH_Settings::CURSOR_WIDTH, KPMH_Settings::CURSOR_HEIGHT)
end
end
end