赞 | 2 |
VIP | 33 |
好人卡 | 33 |
积分 | 14 |
经验 | 54000 |
最后登录 | 2024-9-21 |
在线时间 | 1295 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1358
- 在线时间
- 1295 小时
- 注册时间
- 2012-8-4
- 帖子
- 749
|
本帖最后由 夜狠简单 于 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
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
|
评分
-
查看全部评分
|