赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 23330 |
最后登录 | 2021-2-21 |
在线时间 | 13 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 65
- 在线时间
- 13 小时
- 注册时间
- 2008-1-11
- 帖子
- 330
|
6楼
楼主 |
发表于 2008-5-3 03:54:42
|
只看该作者
SORRY 冰大大久等了,刚刚有急事 冏
工程直接指到主战轩辕剑菜单的工程地址了。 因为我的工程太大!{/gg} 改哪里希望能注明一下,我到时copy到我的工程里,不胜感激!! {/se}
http://rpg.blue/up_pic/200703/menu.rar
好像sence_menu没有重建。只有 Window_EquipItem
#==============================================================================
# ■ Window_EquipItem
#------------------------------------------------------------------------------
# 装备画面、显示浏览变更装备的候补物品的窗口。
#==============================================================================
class Window_EquipItem_New < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
# equip_type : 装备部位 (0~3)
#--------------------------------------------------------------------------
def initialize(actor, equip_type)
super(400, 48, 240, 364)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
@column_max = 1
@actor = actor
@equip_type = equip_type
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 获取物品
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# 添加可以装备的武器
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons)
end
end
end
# 添加可以装备的防具
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors.kind == @equip_type-1
@data.push($data_armors)
end
end
end
end
# 添加空白
@data.push(nil)
# 生成位图、描绘全部项目
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max-1
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ● 项目的描绘
# index : 项目符号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4
y = index * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.font.size = 18
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + self.width / @column_max - 72, y, 16, 32, ":", 1)
self.contents.draw_text(x + self.width / @column_max - 64, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
|
|