默认工程里面可以参考下我这个改
#encoding:utf-8 #============================================================================== # ■ Window_MenuCommand #------------------------------------------------------------------------------ # 菜单画面中显示指令的窗口 #============================================================================== class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # ● 获取项目的绘制矩形 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new rect.width = item_width-80#矩形宽度减80 rect.height = item_height rect.x = index % col_max * (item_width + spacing) rect.y = index / col_max * item_height rect end #-------------------------------------------------------------------------- # ● 获取项目的绘制矩形(内容用) #-------------------------------------------------------------------------- def item_rect_for_text(index) rect = item_rect(index) rect.x += 4 rect.width -= 8-80#矩形宽度减-80 rect end end
#encoding:utf-8
#==============================================================================
# ■ Window_MenuCommand
#------------------------------------------------------------------------------
# 菜单画面中显示指令的窗口
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# ● 获取项目的绘制矩形
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new
rect.width = item_width-80#矩形宽度减80
rect.height = item_height
rect.x = index % col_max * (item_width + spacing)
rect.y = index / col_max * item_height
rect
end
#--------------------------------------------------------------------------
# ● 获取项目的绘制矩形(内容用)
#--------------------------------------------------------------------------
def item_rect_for_text(index)
rect = item_rect(index)
rect.x += 4
rect.width -= 8-80#矩形宽度减-80
rect
end
end
|