#==============================================================================
# ** Window_Time
#------------------------------------------------------------------------------
# This window displays playtime on the menu screen.
#==============================================================================
WINDOWX = 0
WINDOWY = 0
class Window_Time < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH * 3)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@time = Graphics.frame_count / Graphics.frame_rate
hour = @time / 60 / 60
min = @time / 60 % 60
sec = @time % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 120, self.height / 2, text, 1)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @time
refresh
end
end
end
class Scene_Map < Scene_Base
def start
super
@time_window = Window_Time.new(0, 0)
$game_map.refresh
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
end
def update
super
@time_window.update
$game_map.interpreter.update # Update interpreter
$game_map.update # Update map
$game_player.update # Update player
$game_system.update # Update timer
# $time_window.update
@spriteset.update # Update sprite set
@message_window.update # Update message window
unless $game_message.visible # Unless displaying a message
update_transfer_player
update_encounter
update_call_menu
update_call_debug
update_scene_change
end
end
end