| 赞 | 8 |
| VIP | |
| 好人卡 | |
| 积分 | 24 |
| 经验 | |
| 最后登录 | 2026-11-23 |
| 在线时间 | 1014 小时 |
- 梦石
- 0
- 星屑
- 2378
- 在线时间
- 1014 小时
- 注册时间
- 2012-4-30
- 回帖
- 1459

|
发表于 2012-6-13 19:25:53
|
显示全部楼层
本帖最后由 铅笔描绘的思念 于 2012-6-13 19:27 编辑
- class Window_Pos < Window_Base
- def initialize
- super(10, -16, 344, 100)#这里设置窗口的X坐标、Y坐标、宽、高(屏幕显示为544*416)
- self.z = 151
- self.opacity = 0
- unless $game_switches[1]#利用开关控制窗口是否显示,1代表一号开关
- self.openness = 255
- else
- self.openness = 0
- end
- @sec = 0
- refresh
- end
- def refresh
- self.contents.clear
- self.contents.font.color = text_color(0)
- self.contents.font.size = 16 # 字体大小
- text = "文字" # ""中间的文字可以随意替换
- self.contents.draw_text(0, 0, 312, 30, text, 0)
-
- end
- def update
- sec = Graphics.frame_count / Graphics.frame_rate
- if sec - @sec > 59
- @sec = sec
- refresh
- else
- return
- end
- end
- end
- class Scene_Map < Scene_Base
- alias old_start start
- def start
- old_start
- @pos_window = Window_Pos.new
- end
- alias old_ter terminate
- def terminate
- old_ter
- @pos_window.dispose
- end
- alias old_update update
- def update
- old_update
- @pos_window.update
- end
- end
复制代码 |
|