枫の叶 发表于 2015-12-6 11:27 ![]()
把里面描绘金钱的地方换成这个
gold = value.abs
text = ''
具体是怎么改啊!
# ■ Window_Gold #------------------------------------------------------------------------------ # 显示金钱的窗口。 #============================================================================== class Window_Gold < Window_Base #-------------------------------------------------------------------------- # ● 初始化窗口 #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def money(n) gold = $game_party.gold / 10000 #金 silver = ($game_party.gold - gold * 10000) / 100 #银 copper = $game_party.gold - gold * 10000 - silver * 100 #铜 return gold, silver, copper end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color main_money = money($game_party.gold) text = main_money[2].to_s + "铜" text = main_money[1].to_s + "银" + text if main_money[1] > 0 and main_money[0] > 0 text = main_money[0].to_s + "金" + text if main_money[0] > 0 self.contents.draw_text(4, 0, 120-2, 32, text, 2) end end
# ■ Window_Gold
#------------------------------------------------------------------------------
# 显示金钱的窗口。
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def money(n)
gold = $game_party.gold / 10000 #金
silver = ($game_party.gold - gold * 10000) / 100 #银
copper = $game_party.gold - gold * 10000 - silver * 100 #铜
return gold, silver, copper
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
main_money = money($game_party.gold)
text = main_money[2].to_s + "铜"
text = main_money[1].to_s + "银" + text if main_money[1] > 0 and main_money[0] > 0
text = main_money[0].to_s + "金" + text if main_money[0] > 0
self.contents.draw_text(4, 0, 120-2, 32, text, 2)
end
end
|