加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 l734273398 于 2020-11-13 17:14 编辑
如题:劳烦大佬们帮帮忙
怎么在对话框中,显示文章,怎么把等级的名称显示出来,而不是代入等级的数字
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
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
|