| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 2 |  
| 经验 | 0 |  
| 最后登录 | 2015-4-25 |  
| 在线时间 | 25 小时 |  
 Lv1.梦旅人 
	梦石0 星屑1515 在线时间25 小时注册时间2012-10-25帖子1 | 
| #============================================================================== # ■ Window_PlayTime
 #------------------------------------------------------------------------------
 #  菜单画面显示游戏时间的窗口。
 #==============================================================================
 
 class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # ● 初始化对像
 #--------------------------------------------------------------------------
 def initialize(x, y)
 super(x , y, 160 , 70)
 refresh
 end
 #--------------------------------------------------------------------------
 # ● 刷新
 #--------------------------------------------------------------------------
 def refresh
 self.contents.clear
 self.contents.font.color = system_color
 self.contents.font.size = 18
 self.contents.draw_text(29, -8, 120, 32, "遊戲時間")
 @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(-12, 15, 100, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # ● 刷新画面
 #--------------------------------------------------------------------------
 def update
 super
 if Graphics.frame_count / Graphics.frame_rate != @total_sec
 refresh
 end
 end
 end
 | 
 评分
查看全部评分
 |