| 赞 | 2 |
| VIP | |
| 好人卡 | |
| 积分 | 18 |
| 经验 | |
| 最后登录 | 2026-5-24 |
| 在线时间 | 1313 小时 |
- 梦石
- 0
- 星屑
- 1788
- 在线时间
- 1313 小时
- 注册时间
- 2012-8-4
- 回帖
- 724
|
发表于 2016-10-3 19:46:31
|
显示全部楼层
本帖最后由 夜狠简单 于 2016-10-3 19:49 编辑
- class Window_Selectable1<Window_Selectable
- #--------------------------------------------------------------------------
- # ● 更新光标矩形
- #--------------------------------------------------------------------------
-
- def update_cursor_rect
- super()
- # 计算光标的x,y,宽度
- x,y,cursor_width=[[85,0,90],[85,32,90],[0,32*2,90],[185,32*2,90],
- [85,32*3,125]][@index]
- # 更新光标矩形
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- end
- #==============================================================================
- # ■ Window_EquipRight
- #------------------------------------------------------------------------------
- # 装备画面、显示角色现在装备的物品的窗口。
- #==============================================================================
- class Window_EquipRight< Window_Selectable1
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(272, 64, 368, 192)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- self.index = 0
- end
- #--------------------------------------------------------------------------
- # ● 获取物品
- #--------------------------------------------------------------------------
- def item
- return @data[self.index]
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @data = []
- @data.push($data_weapons[@actor.weapon_id])
- @data.push($data_armors[@actor.armor1_id])
- @data.push($data_armors[@actor.armor2_id])
- @data.push($data_armors[@actor.armor3_id])
- @data.push($data_armors[@actor.armor4_id])
- @item_max = @data.size
- self.contents.font.color = system_color
- draw_item_name(@data[0], 92, 32 * 0)
- draw_item_name(@data[1], 92, 32 * 1)
- draw_item_name(@data[2], 4, 32 * 2)
- draw_item_name(@data[3], 192, 32 * 2)
- draw_item_name(@data[4], 92, 32 * 3)
- end
- #--------------------------------------------------------------------------
- # ● 刷新帮助文本
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_text(self.item == nil ? "" : self.item.description)
- end
- end
复制代码 |
评分
-
查看全部评分
|