ow ow ow..
woke woke..
Ingat ini taruh di bawah Materials tetapi di atas main process !
#=================================================================
# ** Window_PlayTime
#-----------------------------------------------------------------
# This window displays play time on the menu screen.
#=================================================================
class Window_PlayTime < Window_Base
#---------------------------------------------------------------
# * Object Initialization
#---------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#---------------------------------------------------------------
# * Refresh
#---------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 16
t = Time.now
time = t.strftime("%I:%M:%S %p")
date = t.strftime("%a, %d %b, %Y")
self.contents.font.color = normal_color
self.contents.draw_text(0, -2, 140, WLH, date, 1)
self.contents.draw_text(0, 14, 140, WLH, time, 1)
end
#---------------------------------------------------------------
# * Frame Update
#---------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end