| 赞 | 0 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 1 |
| 经验 | 11149 |
| 最后登录 | 2012-4-6 |
| 在线时间 | 0 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 0 小时
- 注册时间
- 2007-6-3
- 帖子
- 522
|
LZ的意思是把菜单里“状态”两字换掉吗?
如果是的话。。。。LZ帖错脚本了{/lh}
因该改 Window_MenuCommand 脚本块,改这里
@commands = ["物品", "奇术", "装备", "状态", "天书"]
- #==============================================================================
- # ■ Window_MenuCommand
- #------------------------------------------------------------------------------
- # 商店画面、选择要做的事的窗口
- #==============================================================================
- class Window_MenuCommand < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize(index = 0)
- super(0, 0, 640, 64)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.index = index
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.font.size = 20
- self.contents.draw_text(4, 0, 640, 32, " 菜 单")
- @item_max = 5
- @column_max = 5
- @commands = ["物品", "奇术", "装备", "手动加点", "天书"]
- bitmap = RPG::Cache.icon("032-item01")
- self.contents.blt(174, 4, bitmap, Rect.new(0, 0, 24, 24))
- bitmap = RPG::Cache.icon("044-skill01")
- self.contents.blt(274, 4, bitmap, Rect.new(0, 0, 24, 24))
- bitmap = RPG::Cache.icon("equip")
- self.contents.blt(374, 4, bitmap, Rect.new(0, 0, 24, 24))
- bitmap = RPG::Cache.icon("status")
- self.contents.blt(474, 4, bitmap, Rect.new(0, 0, 24, 24))
- bitmap = RPG::Cache.icon("038-item07")
- self.contents.blt(574, 4, bitmap, Rect.new(0, 0, 24, 24))
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘项目
- # index : 项目编号
- #--------------------------------------------------------------------------
- def draw_item(index, color = normal_color)
- self.contents.font.color = color
- x = 104 + index * 100 + 40
- self.contents.draw_text(x-11, 0, 44, 32, @commands[index])
- end
- #--------------------------------------------------------------------------
- # ● 项目无效化
- # index : 项目编号
- #--------------------------------------------------------------------------
- def disable_item(index)
- draw_item(index, disabled_color)
- end
- #--------------------------------------------------------------------------
- # ● 更新光标举行
- #--------------------------------------------------------------------------
- def update_cursor_rect
- # 光标位置不满 0 的情况下
- if @index < 0
- self.cursor_rect.empty
- return
- end
- # 获取当前的行
- row = @index / @column_max
- # 当前行被显示开头行前面的情况下
- if row < self.top_row
- # 从当前行向开头行滚动
- self.top_row = row
- end
- # 当前行被显示末尾行之后的情况下
- if row > self.top_row + (self.page_row_max - 1)
- # 从当前行向末尾滚动
- self.top_row = row - (self.page_row_max - 1)
- end
- # 计算光标的宽
- cursor_width = 600 / (@column_max + 1) - 32
- # 计算光标坐标
- x = 92 + @index % @column_max * (cursor_width + 32) + 40
- y = @index / @column_max * 32 - self.oy
- # 更新国标矩形
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- end
复制代码 系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~ |
|