#============================================================================== # ¡á Window_NowTime #------------------------------------------------------------------------------ # ¡¡ÇöÀç½Ã°£À» Ç¥½ÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_NowTime < Window_Base #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(0, 0, 200, 50) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font = Font.new("³ª´®°íµñ", 18) # <- font, size self.opacity = 180 self.back_opacity = 180 refresh end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh self.contents.clear time = Time.now text = time.strftime("ÇöÀç½Ã°£ - %X") self.contents.draw_text(0, -7, 120, 32, text, 2) end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å #-------------------------------------------------------------------------- def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end class Scene_Map alias update_before_map update def update update_before_map @window_nowtime = Window_NowTime.new unless @window_nowtime @window_nowtime.update unless $scene.is_a?(Scene_Map) @window_nowtime.dispose @window_nowtime = nil end end end