查看: 1414|回复: 2

如何在菜单和战斗中显示头像?

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-10-1
回帖
4
发表于 2008-11-10 17:40:30 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
梦石
0
星屑
50
在线时间
75 小时
注册时间
2007-6-25
回帖
2227

开拓者第1届Title华丽大赛亚军

发表于 2008-11-10 17:47:57 | 显示全部楼层
菜单显示头像~
http://rpg.blue/web/shownews.asp?id=124
http://rpg.blue/web/shownews.asp?id=125


战斗显示头像~
http://rpg.blue/web/htm/news131.htm
Window_BattleStatus  的 def refresh 名下加入
head_name("图片名"x,y)

main前插入一个全局显示图片脚本定义一下
def head_name(head_name,x,y)
@bitmap = bitmap.new("Grapics/Pictures/"+head_name)
@rect = Rect.new(0,0,@bimap.width,@bitmap.height)
self.contents.blt(x, y, @bitmap, @rect)
end

后面那个准确度不确定~好吧~最近问题有点难~
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
新浪微博~求粉ING~
  怕麻烦~不擅表达~希望永远是萝莉ING~最擅长浪费时间~^-^~扭头~ →_→ ~
回复

使用道具 举报

梦石
0
星屑
1094
在线时间
170 小时
注册时间
2008-10-29
回帖
399
发表于 2008-11-10 17:50:10 | 显示全部楼层
在相应的窗口的类种的 refresh 里加入一句


    def refresh
      self.contents.clear
      testname = @actor.battler_name+"_h.png"
      bitmap=Bitmap.new("Graphics/battlers/#{testname}")
      src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
      self.contents.blt(0, y, bitmap, src_rect)  
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部