Project1
标题:
关于系统状态窗口怎样显示大头像???
[打印本页]
作者:
伤心的狐狸
时间:
2008-3-21 00:49
提示:
作者被禁止或删除 内容自动屏蔽
作者:
9244579
时间:
2008-3-21 01:24
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化目标
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 20
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors
# draw_actor_picture(actor, x - 40, y + 80)
draw_actor_name(actor, x+20, y)
draw_actor_class(actor, x + 144+20, y)
draw_actor_level(actor, x+20, y + 32)
draw_actor_state(actor, x + 20+90, y + 32)
draw_actor_exp(actor, x+20, y + 64)
draw_actor_hp(actor, x +20+ 236, y + 32)
draw_actor_sp(actor, x + 20+236, y + 64)
draw_actor_picture1
draw_actor_picture2
draw_actor_picture3
draw_actor_picture4
end
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
#--------------------------------------------------------------------------
# ● 图形的描绘
# actor : 角色 1 号
#--------------------------------------------------------------------------
def draw_actor_picture1
if $game_party.actors.include?($game_actors[1])
bitmap = RPG::Cache.picture("1")
else
bitmap = RPG::Cache.picture("0")
end
src_rect = Rect.new(0, 0, 400, 400)
self.contents.blt(-30, -15, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 图形的描绘
# actor : 角色 2 号
#--------------------------------------------------------------------------
def draw_actor_picture2
if $game_party.actors.include?($game_actors[2])
bitmap = RPG::Cache.picture("2")
else
bitmap = RPG::Cache.picture("0")
end
src_rect = Rect.new(0, 0, 400, 400)
self.contents.blt(-30, +95, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 图形的描绘
# actor : 角色 3 号
#--------------------------------------------------------------------------
def draw_actor_picture3
if $game_party.actors.include?($game_actors[3])
bitmap = RPG::Cache.picture("3")
else
bitmap = RPG::Cache.picture("0")
end
src_rect = Rect.new(0, 0, 400, 400)
self.contents.blt(-30, +210, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 图形的描绘
# actor : 角色 4 号
#--------------------------------------------------------------------------
def draw_actor_picture4
if $game_party.actors.include?($game_actors[4])
bitmap = RPG::Cache.picture("4")
else
bitmap = RPG::Cache.picture("0")
end
src_rect = Rect.new(0, 0, 400, 400)
self.contents.blt(-30, +327, bitmap, src_rect)
end
end
[/quote]
哈哈, 用愚蠢的方法写了出来
用法
要把你想要显示的头像放到picture里
图片名字为 “1” 那么就是显示主角一号的大头象
所以把图片名字改为 1 放在picture里就可以显示它的大头象了哦
图片名字为“2”则是2号角色的大头象了
注:只弄到1-4号角色,要5以上自己参照脚本弄上
对了,还要放一张空白图片名字为 "0"一定要哦
就不说理由了,呵呵
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
伤心的狐狸
时间:
2008-3-21 03:18
提示:
作者被禁止或删除 内容自动屏蔽
作者:
沉影不器
时间:
2008-3-21 03:26
提示:
作者被禁止或删除 内容自动屏蔽
作者:
伤心的狐狸
时间:
2008-3-21 03:40
提示:
作者被禁止或删除 内容自动屏蔽
作者:
伤心的狐狸
时间:
2008-3-21 03:50
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1