#----------------------#
#---| WINDOW_MENUSTATUS |----------------------------------------------------
#----------------------#
class Window_MainMenuStatus < Window_MenuStatus
include Check_Theme
def initialize(x, y, h = 0)
@height = h
super(x, y)
self.opacity = 0
end
def window_width
Graphics.width - 170
end
def standard_padding
return 6
end
def window_height
@height
end
def item_height
(@height - 12)
end
def item_width
window_width / col_max
end
def face_height
return 100
end
def col_max
return 4
end
def spacing
return 0
end
def item_max
return 4
end
def contents_width
item_max * item_width - 10
end
def visible_line_number
return 1
end
def contents_height
item_height
end
def draw_gsimple_vstatus(actor, x, y, height)
contents.font.name = mtheme::FONT
contents.font.size = mtheme::FONT_SIZE
draw_actor_name(actor, x, height)
draw_vglevel(actor, x, height + line_height)
draw_vgclass(actor, x, height + line_height * 2)
contents.font.size = 20
contents.font.name = mtheme::GAUGE_FONT
w = item_width - 10
draw_vghp(actor, x, height + line_height * 3, w)
draw_vgmp(actor, x, height + line_height * 4, w)
if actor.preserve_tp? && GMENU::SHOW_TP
draw_vgtp(actor, x, height + line_height * 5, w)
end
draw_vgxp(actor, x, height + line_height * 6, w)
draw_gicons(actor, x, height + line_height * 7, w)
end
def draw_vghp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.hp_rate, mtheme::HP_COLOR1, mtheme::HP_COLOR2)
change_color(system_color)
draw_text(x, y + 7, 30, line_height, Vocab::hp_a, 0)
draw_current_and_max_values(x, y + 3, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
def draw_vgmp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.mp_rate, mtheme::MP_COLOR1, mtheme::MP_COLOR2)
change_color(system_color)
draw_text(x, y + 7, 30, line_height, Vocab::mp_a, 0)
draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
def draw_vgtp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.tp_rate, mtheme::TP_COLOR1, mtheme::TP_COLOR1)
change_color(system_color)
draw_text(x, y + 7, 30, line_height, Vocab::tp_a, 0)
change_color(tp_color(actor))
draw_text(x, y + 7, width, line_height, actor.tp.to_i, 2)
end
def draw_vgxp(actor, x, y, width = (item_width - 20))
draw_vxpgauge(x, y, width, actor.xp_rate, mtheme::XP_COLOR1, mtheme::XP_COLOR2)
end
def draw_vxpgauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, 4, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, 4, color1, color2)
end
def draw_vglevel(actor, x, y)
change_color(system_color)
draw_text(x, y, item_width, line_height, Vocab::level_a + " " + actor.level.to_s, 0)
end
def draw_vgclass(actor, x, y)
change_color(normal_color)
draw_text(x, y, item_width, line_height, actor.class.name, 0)
end
def draw_item(index)
actor = $game_party.members[index]
return if actor.nil?
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
draw_back_graphics(index,item_height,item_width,enabled)
draw_gface(actor.face_name,actor.face_index,rect.x + 1,rect.y + 1,
item_height - 2,enabled)
draw_gsimple_vstatus(actor, rect.x, rect.y, face_height)
end
def process_ok
super
$game_party.menu_actor = $game_party.members[index]
end
def select_last
select($game_party.menu_actor.index || 0)
end
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
def top_col
ox / (item_width + spacing)
end
def top_col=(col)
col = 0 if col < 0
self.ox = col * (item_width + spacing)
end
def bottom_col
top_col + col_max - 1
end
def bottom_col=(col)
self.top_col = col - (col_max - 1)
end
def ensure_cursor_visible
self.top_col = index if index < top_col
self.bottom_col = index if index > bottom_col
end
def item_rect(index)
rect = super
rect.x = index * (item_width + spacing)
rect.y = 0
rect
end
def cursor_down(wrap = false)
end
def cursor_up(wrap = false)
end
def cursor_pagedown
end
def cursor_pageup
end
end