Project1
标题:
问一下 金钱>100000数字为绿色 >1000000数字红色怎么弄
[打印本页]
作者:
qq6221373
时间:
2019-6-8 19:07
标题:
问一下 金钱>100000数字为绿色 >1000000数字红色怎么弄
之前研究过,不太记得怎么写了!
作者:
miantouchi
时间:
2019-6-8 22:39
Window_Gold类里面改下就行了
def refresh
self.contents.clear
cx = contents.text_size($data_system.words.gold).width
if $game_party.gold >= 1000000
self.contents.font.color = Color.new(255, 0, 0, 255)
elsif $game_party.gold >= 100000 and $game_party.gold < 1000000
self.contents.font.color = Color.new(0, 255, 0, 255)
else
self.contents.font.color = normal_color
end
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1