Project1

标题: 行走图改成头像 [打印本页]

作者: 笛子的马甲    时间: 2008-5-28 21:02
提示: 作者被禁止或删除 内容自动屏蔽
作者: 八云紫    时间: 2008-5-28 21:04
66加强菜单的提取:

  1. #==============================================================================
  2. # ■ Window_MenuStatus
  3. #------------------------------------------------------------------------------
  4. #  显示菜单画面和同伴状态的窗口。
  5. #==============================================================================

  6. class Window_MenuStatus < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化目标
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 480, 480)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     refresh
  14.     self.active = false
  15.     self.index = -1
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     @item_max = $game_party.actors.size
  23.     for i in 0...$game_party.actors.size
  24.       x = 108
  25.       y = i * 116
  26.       actor = $game_party.actors[i]
  27.       testname = actor.battler_name+"_f.png"
  28.       if $加密 == true
  29.         bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  30.         src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  31.         self.contents.blt(0, y, bitmap, src_rect)
  32.         draw_actor_name(actor, x, y)
  33.         draw_actor_class(actor, x + 200, y)
  34.         draw_actor_level(actor, x, y + 32)
  35.         draw_actor_state(actor, x + 90, y + 32)
  36.         draw_actor_exp(actor, x, y + 64,180)
  37.         draw_actor_hp(actor, x + 200, y + 32)
  38.         draw_actor_sp(actor, x + 200, y + 64)
  39.       else         
  40.         if FileTest.exist?("Graphics/battlers/#{testname}")
  41.           bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  42.           src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  43.           self.contents.blt(0, y, bitmap, src_rect)
  44.         else
  45.           draw_actor_graphic(actor, x - 60, y + 80)
  46.         end
  47.         draw_actor_name(actor, x, y)
  48.         draw_actor_class(actor, x + 200, y)
  49.         draw_actor_level(actor, x, y + 32)
  50.         draw_actor_state(actor, x + 90, y + 32)
  51.         draw_actor_exp(actor, x, y + 64,180)
  52.         draw_actor_hp(actor, x + 200, y + 32)
  53.         draw_actor_sp(actor, x + 200, y + 64)
  54.       end
  55.     end
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 刷新光标矩形
  59.   #--------------------------------------------------------------------------
  60.   def update_cursor_rect
  61.     if @index < 0
  62.       self.cursor_rect.empty
  63.     else
  64.       self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
  65.     end
  66.   end
  67. end
复制代码


头像文件命名 :  角色名字_f.png [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 笛子的马甲    时间: 2008-5-28 21:05
提示: 作者被禁止或删除 内容自动屏蔽
作者: 八云紫    时间: 2008-5-28 21:08
把 文件取名 为:角色_f.png 即可。
作者: 水仙晶女    时间: 2008-5-28 21:11
提示: 作者被禁止或删除 内容自动屏蔽
作者: 笛子的马甲    时间: 2008-5-28 21:11
提示: 作者被禁止或删除 内容自动屏蔽
作者: alfred    时间: 2008-5-28 21:12
楼主的id真特殊.
作者: 八云紫    时间: 2008-5-28 21:12
Graphics/battlers/
作者: 水仙晶女    时间: 2008-5-28 21:15
提示: 作者被禁止或删除 内容自动屏蔽
作者: 笛子的马甲    时间: 2008-5-28 21:16
提示: 作者被禁止或删除 内容自动屏蔽
作者: 八云紫    时间: 2008-5-28 21:16
好吧,现在可以开始调查 LZ 的真正身份了{/hx}。
作者: 匈魔剑    时间: 2008-5-28 21:16
真佩服八云紫的耐心…………{/pz}
作者: 八云紫    时间: 2008-5-28 21:17
以下引用匈魔剑于2008-5-28 13:16:36的发言:

真佩服八云紫的耐心…………



呵呵,耐心也是可以锻炼的。恩恩{/hx}。
作者: 笛子的马甲    时间: 2008-5-28 21:19
提示: 作者被禁止或删除 内容自动屏蔽
作者: 水仙晶女    时间: 2008-5-28 21:20
提示: 作者被禁止或删除 内容自动屏蔽
作者: 笛子的马甲    时间: 2008-5-28 21:22
提示: 作者被禁止或删除 内容自动屏蔽
作者: 八云紫    时间: 2008-5-28 21:28
以下引用柳柳的马甲于2008-5-28 13:22:11的发言:

的确嗯~~~先占楼嘛



是呀是呀,被你发现了{/hx}。


这贴了,可以转 水区 了。




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1