#==============================================================================
# ■ Map_Name_Display
#------------------------------------------------------------------------------
# 右上角打开功能菜单链接
#==============================================================================
class Window_Page_Turn < Window_HorzCommand
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
def initialize
super(Graphics.width - window_width, 26)
end
#--------------------------------------------------------------------------
# ● 获取项目的内容的宽
#--------------------------------------------------------------------------
def item_width
60
end
#--------------------------------------------------------------------------
# ● 获取项目内容的高
#--------------------------------------------------------------------------
def item_height
24
end
#--------------------------------------------------------------------------
# ● 获取项目的宽
#--------------------------------------------------------------------------
def window_width
140
end
#--------------------------------------------------------------------------
# ● 获取项目的高
#--------------------------------------------------------------------------
def window_height
32
end
#--------------------------------------------------------------------------
# ● 获取项目边距
#--------------------------------------------------------------------------
def standard_padding
return 4
end
#--------------------------------------------------------------------------
# ● 获取项目的内容
#--------------------------------------------------------------------------
def draw_item(index)
rect = item_rect_for_text(index)
contents.font.size = 18
contents.font.bold = true
self.contents.draw_text(rect.x, 3, rect.width, 22, command_name(index),1)
end
#--------------------------------------------------------------------------
# ● 获取项目的绘制矩形
#--------------------------------------------------------------------------
alias pageturn_item_rect item_rect
def item_rect(index)
rect = Rect.new
rect.width = item_width - 4
rect.height = item_height - 4
rect.x = index % col_max * (item_width + spacing) + 2
rect.y = index / col_max * item_height + 2
rect
end
#--------------------------------------------------------------------------
# ● 获取项目的绘制矩形(内容用)
#--------------------------------------------------------------------------
def item_rect_for_text(index)
rect = pageturn_item_rect(index)
rect.x += 4
rect.width -= 8
rect
end
#--------------------------------------------------------------------------
# ● 获取项目选择列表
#--------------------------------------------------------------------------
def make_command_list
if $game_variables[$variables_plies] == 1
add_command("回 城", :gohome)
else
add_command("上一层", :last_plies)
end
add_command("下一层", :next_plies)
end
end