| 赞 | 5 |
| VIP | |
| 好人卡 | |
| 积分 | 39 |
| 经验 | |
| 最后登录 | 2026-8-3 |
| 在线时间 | 1899 小时 |
- 梦石
- 0
- 星屑
- 3850
- 在线时间
- 1899 小时
- 注册时间
- 2010-6-19
- 回帖
- 917
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
下面这个脚本可以显示时间,如何去掉显示几秒,因为这样每秒都刷新,好像地图上的时候有点卡,不知道是不是错觉
- #==============================================================================
- # ■ 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
复制代码 |
|