赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 850 |
最后登录 | 2020-5-5 |
在线时间 | 8 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 8 小时
- 注册时间
- 2008-12-31
- 帖子
- 8
|
4楼
楼主 |
发表于 2013-10-7 01:19:39
|
只看该作者
本帖最后由 cskm2005 于 2013-10-7 01:32 编辑
总算做好了...
但有些角色图怪怪的....
是不是我在头像上拿握得不好?
有些是只有头顶的...
这边贴脚本,给各位大大校证看看...
有需要的人也可以随便拿去...
再次感谢各位...
#encoding:utf-8
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 菜单画面中,显示队伍成员状态的窗口
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
self.y = Graphics.height - self.height
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ● 取得視窗的寬度
#--------------------------------------------------------------------------
def window_width
Graphics.width - 160
end
#--------------------------------------------------------------------------
# ● 取得視窗的高度
#--------------------------------------------------------------------------
def window_height
Graphics.height
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
return 1 #$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 绘制简单的状态
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x -102 , y +12)
draw_actor_nickname(actor, x + 142, y-8)
draw_actor_hp(actor, x -5, y-10)
draw_actor_mp(actor, x +20, y+10)
draw_actor_icons(actor, x, y + line_height * 2)
end
#--------------------------------------------------------------------------
# ● 繪制角色肖像圖
# enabled : 有效的標志。false 的時候使用半透明效果繪制
#--------------------------------------------------------------------------
def draw_face(face_name, face_index, x, y, enabled = true)
bitmap = Cache.face(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 116, 96, 46)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 取得專案數
#--------------------------------------------------------------------------
def item_max
$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 取得專案的高度
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2) / 8
end
end
#encoding:utf-8
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 菜单画面中,显示队伍成员状态的窗口
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
self.y = Graphics.height - self.height
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ● 取得視窗的寬度
#--------------------------------------------------------------------------
def window_width
Graphics.width - 160
end
#--------------------------------------------------------------------------
# ● 取得視窗的高度
#--------------------------------------------------------------------------
def window_height
Graphics.height
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
return 1 #$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 绘制简单的状态
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x -102 , y +12)
draw_actor_nickname(actor, x + 142, y-8)
draw_actor_hp(actor, x -5, y-10)
draw_actor_mp(actor, x +20, y+10)
draw_actor_icons(actor, x, y + line_height * 2)
end
#--------------------------------------------------------------------------
# ● 繪制角色肖像圖
# enabled : 有效的標志。false 的時候使用半透明效果繪制
#--------------------------------------------------------------------------
def draw_face(face_name, face_index, x, y, enabled = true)
bitmap = Cache.face(face_name)
rect = Rect.new(face_index % 4 * 96, face_index / 4 * 116, 96, 46)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
bitmap.dispose
end
#--------------------------------------------------------------------------
# ● 取得專案數
#--------------------------------------------------------------------------
def item_max
$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 取得專案的高度
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2) / 8
end
end
|
|