赞 | 46 |
VIP | 271 |
好人卡 | 233 |
积分 | 94 |
经验 | 181865 |
最后登录 | 2024-9-17 |
在线时间 | 2748 小时 |
Lv4.逐梦者 「Pemercyia」 泱 银 Urhurrenna
- 梦石
- 0
- 星屑
- 9397
- 在线时间
- 2748 小时
- 注册时间
- 2008-9-5
- 帖子
- 3543
|
加了点东西,改了点写法……- #==============================================================================
- # ■ Window_EquipRight
- #------------------------------------------------------------------------------
- # 装备画面、显示角色现在装备的物品的窗口。
- #==============================================================================
- class Window_EquipRight < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(320, 90,1280-640-80, 200)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- @column_max = 2
- refresh
- self.index = 0
- end
-
- def set_actor(actor)
- @actor = actor
- refresh
- 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])
- @data.push($data_armors[@actor.armor5_id])
- @data.push($data_armors[@actor.armor6_id])
- @data.push($data_armors[@actor.armor7_id])
- @data.push($data_armors[@actor.armor8_id])
- @data.push($data_armors[@actor.armor9_id])
-
- @item_max = @data.size
-
- self.contents.font.color = system_color
- self.contents.draw_text(text_x(0), text_y(0), 92, 32, "武器" )
- self.contents.draw_text(text_x(1), text_y(1), 92, 32, "部位1")
- self.contents.draw_text(text_x(2), text_y(2), 92, 32, "部位2")
- self.contents.draw_text(text_x(3), text_y(3), 92, 32, "部位3")
- self.contents.draw_text(text_x(4), text_y(4), 92, 32, "部位4")
- self.contents.draw_text(text_x(5), text_y(5), 92, 32, "部位5")
- self.contents.draw_text(text_x(6), text_y(6), 92, 32, "部位6")
- self.contents.draw_text(text_x(7), text_y(7), 92, 32, "部位7")
- self.contents.draw_text(text_x(8), text_y(8), 92, 32, "部位8")
- self.contents.draw_text(text_x(9), text_y(9), 92, 32, "部位9")
-
-
- for i in 0..9
- draw_item_name(@data[i], 92 + text_x(i), text_y(i))
- end
-
- #~ draw_item_name(@data[0], 92 + text_x(0), text_y(0))#武器
- #~ draw_item_name(@data[1], 92 + text_x(1), text_y(1))#部位1
- #~ draw_item_name(@data[2], 92, 32 * 2)#部位2
- #~ draw_item_name(@data[3], 92, 32 * 3)#部位3
- #~ draw_item_name(@data[4], 92, 32 * 4)#部位4
- #~
- #~ draw_item_name(@data[5], 92*4, 0 )# 部位5
- #~ draw_item_name(@data[6], 92*4, 32 )# 部位6
- #~ draw_item_name(@data[7], 92*4, 32 * 2)# 部位7
- #~ draw_item_name(@data[8], 92*4, 32 * 3)# 部位8
- #~ draw_item_name(@data[9], 92*4, 32 * 4)# 部位9
-
- end
-
- def line_height
- return 32
- end
- def col_space
- return 184
- end
- def text_x(index)
- return col_space * (index % @colum_max)
- end
- def text_y(index)
- return line_height * index / @colum_max
- end
- end
复制代码 |
评分
-
查看全部评分
|