#============================================================================
# ** Window_GameStatistics
#----------------------------------------------------------------------------
# This window will show all three of the basic game statistics in one window
# instead of three - (Gold, Playtime, and Steps taken)
#----------------------------------------------------------------------------
class Window_GameStatistics < Window_Base
def initialize
super(0, 0, 160, 150)
self.contents =
Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
cx = contents.text_size($data_
system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(22, 0, 120-cx-2, 32, $game_
party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(22-cx, 0, cx, 32, $data_
system.words.gold, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 28, 120, 32, "Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 28, 120, 32, text, 2)
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
self.contents.font.color = system_color
self.contents.draw_text(4, 54, 120, 32, "Steps")
self.contents.font.color = normal_color
self.contents.draw_text(4, 74, 12, 32, $game_
party.steps.to_s, 2)
end
end