赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 2 |
经验 | 16065 |
最后登录 | 2021-10-16 |
在线时间 | 195 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 247
- 在线时间
- 195 小时
- 注册时间
- 2008-4-13
- 帖子
- 330
|
回复 zxc3824 的帖子
Window_Command 原脚本:- def initialize(width, commands)
- # 由命令的个数计算出窗口的高
- super(0, 0, width, commands.size * 32 + 32)
- @item_max = commands.size
- @commands = commands
- self.contents = Bitmap.new(width - 32, @item_max * 32)
- refresh
- self.index = 0
- end
复制代码 修改为:- def initialize(width, commands)
- # 由命令的个数计算出窗口的高
- # 如果运行 Scene_Menu
- if $scene.is_a?(Scene_Menu)
- super(0, 0, width, 64)
- @item_max = commands.size
- @column_max = 6
- @commands = commands
- self.contents = Bitmap.new(width - 32, 32)
- else
- super(0, 0, width, commands.size * 32 + 32)
- @item_max = commands.size
- @commands = commands
- self.contents = Bitmap.new(width - 32, @item_max * 32)
- end
- refresh
- self.index = 0
- end
复制代码 Window_Command 原脚本:- def draw_item(index, color)
- self.contents.font.color = color
- rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(rect, @commands[index])
- end
复制代码 修改为:- def draw_item(index, color)
- self.contents.font.color = color
- if $scene.is_a?(Scene_Menu)
- rect = Rect.new(4 + 109 * index, 0, self.contents.width - 8, 32)
- else
- rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
- end
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(rect, @commands[index])
- end
复制代码 |
|