| 赞 | 2 |
| VIP | |
| 好人卡 | |
| 积分 | 18 |
| 经验 | |
| 最后登录 | 2026-5-24 |
| 在线时间 | 1313 小时 |
- 梦石
- 0
- 星屑
- 1788
- 在线时间
- 1313 小时
- 注册时间
- 2012-8-4
- 回帖
- 724
|
发表于 2017-4-10 16:01:30
|
显示全部楼层
默认工程里面可以参考下我这个改
[pre lang="ruby"]#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[/pre] |
|