#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
# 显示现实时间
#==============================================================================
class Window_RealTime < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(24, 38, 100, 50-4)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 13
self.contents.font.name = (["黑体","宋体"])
self.opacity = 0
self.z = 300
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
@total_sec = Graphics.frame_count / Graphics.frame_rate
time = Time.now
text = time.strftime("%x %X")
self.contents.font.color = normal_color
self.contents.draw_text(-68, -24, 130, 64, text, 2)
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end