#==============================================================================
# Window_MenuStatus
#------------------------------------------------------------------------------
# Janela que exibe os status dos membros da equipe no menu.
#
# Modificado por Angel Ivy-Chan.
#
# Post Scriptum: Essa classe foi removida do AI-chan Menu.
#
#==============================================================================
class Game_Party < Game_Unit
MAX_MEMBERS = 8
end
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# Inicialização do objeto
# x : coordenada X da janela
# y : coordenada Y da janela
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# Atualização
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.bold = true
self.contents.font.shadow = true
self.contents.font.size = 16
@item_max = $game_party.members.size
@item_halfmax = 4
for actor in $game_party.members
if actor.index >= 4
i = actor.index - 4
draw_actor_graphic(actor, 208, i * 96 + 36)
x = 240
y = i * 96 + WLH / 2
hx = x - 48
hy = y + 20
mx = hx
my = hy + 20
draw_actor_state(actor, x - 48, y + WLH * 2)
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x - 24, y + WLH * 1)
draw_actor_mp(actor, x - 24, y + WLH * 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 78, y, 32, WLH, "L")
self.contents.font.color = text_color(10)
self.contents.draw_text(x + 90, y, 24, WLH, actor.level, 0)
else
draw_actor_graphic(actor, 32, actor.index * 96 + 36)
x = 64
y = actor.index * 96 + WLH / 2
hx = x - 48
hy = y + 20
mx = hx
my = hy + 20
draw_actor_state(actor, x - 48, y + WLH * 2)
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x - 24, y + WLH * 1)
draw_actor_mp(actor, x - 24, y + WLH * 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 78, y, 32, WLH, "L")
self.contents.font.color = text_color(10)
self.contents.draw_text(x + 90, y, 24, WLH, actor.level, 0)
end
end
end
#--------------------------------------------------------------------------
# Atualização do cursor
#--------------------------------------------------------------------------
def update_cursor
if cursor_movable?
last_index = @index
if Input.repeat?(Input::RIGHT)
if last_index > @item_max - 5 and last_index < 4 and @item_max < 8
@index = @item_max - 1
elsif last_index >= 4 and @item_max > 4
@index = last_index - 4
elsif @item_max > 4
@index = last_index + 4
else
@index = @item_max - 1
end
end
if Input.repeat?(Input::LEFT)
if last_index > @item_max - 5 and last_index < 4 and @item_max < 8
@index = @item_max - 1
elsif last_index < 4 and @item_max > 4
@index = last_index + 4
elsif @item_max > 4
@index = last_index - 4
else
@index = 0
end
end
if @index != last_index
Sound.play_cursor
end
end
if @index < 0 # Sem cursor
self.cursor_rect.empty
elsif @index < @item_halfmax # Padrão
self.cursor_rect.set(0, @index * 96, contents.lammer / 2, 96)
elsif @index >= @item_max and @item_max < @item_halfmax # Beta.
self.cursor_rect.set(0, @index * 96, contents.lammer / 2, 96)
elsif @index >= @item_halfmax and @index < @item_max # Passou da metade.
k = @index - 4
self.cursor_rect.set(contents.lammer / 2, k * 96, contents.lammer / 2, 96)
elsif @index >= 100 # Si
self.cursor_rect.set(0, (@index - 100) * 96, contents.lammer, 96)
else # O todo
self.cursor_rect.set(0, 0, contents.lammer, @item_halfmax * 96)
end
end
end