- 注册时间
- 2004-5-16
- 最后登录
- 2024-11-13
超级版主
传说中的Bunny坑神~!
 
- 积分
- 244543

|
偶素新手...不要笑偶...[em04]
window_base里修改.
#--------------------------------------------------------------------------
# ● 描绘物品名(去掉显示小图标)
# item : 物品
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
#--------------------------------------------------------------------------
def draw_item_name(item, x, y)
if item == nil
return
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
end
#--自行添加-----------------------------------------------
# ● 自定义物品图片
#-------------------------------------------------
def draw_item_picture(item,x,y)
if item==nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x+4, y, bitmap, Rect.new(0, 0, 100, 100))
end
window_help里面
class Window_Help < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像(修改说明窗口大小)
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 132)
self.contents = Bitmap.new(width - 32, height - 32)
end
#--------------------------------------------------------------------------
# ● 设置文本(改为中间对齐)
# text : 窗口显示的字符串
# align : 对齐方式 (0..左对齐、1..中间对齐、2..右对齐)
#--------------------------------------------------------------------------
def set_text(text, align = 1)
# 如果文本和对齐方式的至少一方与上次的不同
if text != @text or align != @align
# 再描绘文本
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--自行添加-----------------------------------------------
# ● 显示物品图片
# item : 要显示图片的物品
#--------------------------------------------------------------------------
def set_picture(item)
if item != @item
draw_item_picture(item,0,0)
@item= nil
end
self.visible = true
end
window_item
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像(改变物品窗口大小和位置)
#--------------------------------------------------------------------------
def initialize
super(0, 132, 640, 348)
@column_max = 2
refresh
self.index = 0
# 战斗中的情况下将窗口移至中央并将其半透明化
if $game_temp.in_battle
self.y = 132
self.height = 188
self.back_opacity = 160
end
end
#--------------------------------
#--------------------------------------------------------------------------
# ● 描绘项目(去掉显示小图标)
# index : 项目编号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, "x", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本(添加一行显示图标)
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
@help_window.set_picture(self.item)
end
end
下面是效果...
Window_EquipItem还没修改...|||= =不过差不多啦....
问题!
存档里显示的人物实际上是静止图片截一部分下来...希望像轩三那样,被选择的存档人物就会走动...或者交替显示两张图片,或者是直接改写成行走动画(反正偶都不会...)...希望高手指教!
[此贴子已经被作者于2004-10-9 12:30:59编辑过] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|