赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 3471 |
最后登录 | 2013-1-10 |
在线时间 | 150 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 150 小时
- 注册时间
- 2009-7-29
- 帖子
- 57
|
9楼
楼主 |
发表于 2009-8-30 17:36:19
|
只看该作者
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化目标
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 352)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -2
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 80
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 50, y + 50)
# 我全写成散的! =。=
self.contents.font.color = normal_color
self.contents.font.size = 20
self.contents.draw_text(x - 30, y, 120, 32, actor.name)
self.contents.font.color = system_color
self.contents.draw_text(x - 55, y + 50, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x - 40, y + 50, 24, 32, actor.level.to_s, 2)
self.contents.font.size = 16
self.contents.font.color = system_color
self.contents.draw_text(x - 30, y + 17, 32, 32, $data_system.words.hp)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x - 6, y + 17, 32, 32, actor.hp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x - 26 + 48, y + 17, 12, 32, "/", 1)
self.contents.draw_text(x - 24 + 56, y + 17, 32, 32, actor.maxhp.to_s)
self.contents.font.color = system_color
self.contents.draw_text(x - 30, y + 34, 32, 32, $data_system.words.sp)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x - 6, y + 34, 32, 32, actor.sp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x - 26 + 48, y + 34, 12, 32, "/", 1)
self.contents.draw_text(x - 24 + 56, y + 34, 32, 32, actor.maxsp.to_s)
end
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
if @index <= -2
self.cursor_rect.empty
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
else
self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
end
end
end |
|