==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
Item_Height = 45
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
x = 0
y = actor.index * 40
draw_actor_name(actor, x, y)
draw_actor_class(actor, x+90, y)
draw_actor_level(actor, x+160, y)
draw_actor_state(actor, x+200, y)
draw_actor_hp(actor, x+220 , y )
draw_actor_mp(actor, x+220 , y+15 )
end
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(0, @index * Item_Height, contents.width,
Item_Height)
elsif @index >= 100 # Self
self.cursor_rect.set(0, (@index - 100) * Item_Height, contents.width,
Item_Height)
else # All
self.cursor_rect.set(0, 0, contents.width, @item_max * Item_Height)
end
end
end