| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 64 |
| 经验 | |
| 最后登录 | 2026-9-27 |
| 在线时间 | 1700 小时 |
- 梦石
- 0
- 星屑
- 6412
- 在线时间
- 1700 小时
- 注册时间
- 2018-1-16
- 回帖
- 364
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 l734273398 于 2020-11-13 17:14 编辑
如题:劳烦大佬们帮帮忙
怎么在对话框中,显示文章,怎么把等级的名称显示出来,而不是代入等级的数字
[pre lang="ruby"]LEVEL_LIST = {
1=>"菜鸡",
2=>"小菜鸡",
}
LEVEL_LIST2 = {
1=>"勇士",
2=>"小勇士",
}
class Window_Base < Window
def draw_actor_level(actor, x, y)
if LEVEL_LIST.has_key?(actor.level) or LEVEL_LIST2.has_key?(actor.level)
self.contents.draw_text(x, y, 128, 32, LEVEL_LIST[actor.level]) if $game_switches[1]
self.contents.draw_text(x, y, 128, 32, LEVEL_LIST2[actor.level]) if $game_switches[2]
else
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
end
end
[/pre] |
|