#==============================================================================
# ** Facesets in Menu
#------------------------------------------------------------------------------
# This window replaces the character sprite with a faceset in the menu
# Make sure you have a file with the same name in the Pictures folder
# e.g. Graphics\Pictures\001-Fighter01.png
# Designed to work best with a 100x100 pixel faceset
#
# 18Jan09 - Brew (ref: NekoMaster_Battle)
#==============================================================================
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 110
y = i * 116
actor = $game_party.actors[i]
draw_actor_face(actor, 0, y)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 190, y + 32)
draw_actor_sp(actor, x + 190, y + 64)
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
# Set the last value to the height of your faceset
self.cursor_rect.set(0, @index * 116, self.width - 32, 100)
end
end
#--------------------------------------------------------------------------
# * Draw Face
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture(actor.character_name)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, bitmap, src_rect)
end
end