赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 589 |
最后登录 | 2013-2-19 |
在线时间 | 1 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1 小时
- 注册时间
- 2010-9-2
- 帖子
- 27
|
3楼

楼主 |
发表于 2013-2-19 10:24:40
|
只看该作者
谢谢我找了,但是不适用xv
我在网上找了一个老外写的,但也是xp的,哪位老大能转化成xv的吗?太感谢了!- t = Time.now
- time = t.strftime("%I:%M:%S %p")
- date = t.strftime("%a, %d %b, %Y")
复制代码- #=================================================================
- # ** 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
复制代码 |
|