- 注册时间
- 2004-10-20
- 最后登录
- 2005-6-17
⑥精研
- 积分
- 1043
|
发表于 2004-12-23 14:24:27
|
显示全部楼层
这是我修改的,楼主可以参考看看
# ■ Window_BattleResult
#------------------------------------------------------------------------------
# 战斗结束时、显示获得的 EXP 及金钱的窗口。
class Window_BattleResult < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# exp : EXP
# gold : 金钱
# treasures : 宝物
#--------------------------------------------------------------------------
def initialize(exp, gold, treasures)
@exp = exp
@gold = gold
@treasures = treasures
super(0, 0, 380, 240)<==修改窗口大小
self.contents = Bitmap.new(width - 32, height - 32)
self.windowskin = RPG::Cache.windowskin(\"001-Blue01\")<==这里,是换我想要的windowskin
self.back_opacity = 160
self.z = 1000
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
#EXP显示部分
x = 4
self.contents.font.color = text_color(6)<==文字颜色
cx = contents.text_size(\"打了这幺久,终于获得EXP \").width<==此变量为文字的宽度,以免之后的数字压过字符串。
self.contents.draw_text(x, 0, cx, 24, \"打了这幺久,终于获得EXP \")<==修改文字显示部分
#以下则是EXP数值部分
x += cx + 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, 64, 24, @exp.to_s)
#金钱显示部分
x = 4
self.contents.font.color = text_color(6)
cx = contents.text_size(\"获得GL \").width
self.contents.draw_text(x, 24, cx, 24,\"获得GL \" )
x += cx + 4
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 24, 128, 24, @gold.to_s)
#物品显示部分
x = 4
self.contents.font.color = text_color(6)
cx = contents.text_size(\"获得物品\").width
self.contents.draw_text(x, 48, cx, 24, \"获得物品\")
y = 72
for item in @treasures
draw_item_name(item, 4, y)
y += 24
end
end
end
效果
[此贴子已经被作者于2004-12-23 14:25:13编辑过] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|