| 赞 | 35 |
| VIP | |
| 好人卡 | |
| 积分 | 64 |
| 经验 | |
| 最后登录 | 2025-12-12 |
| 在线时间 | 1473 小时 |
- 梦石
- 0
- 星屑
- 6375
- 在线时间
- 1473 小时
- 注册时间
- 2015-7-25
- 回帖
- 609
 
|
发表于 2017-7-13 23:24:51
|
显示全部楼层
首先是个性光标,
那么既然是标题画面,那就先找到Scene_Title
然后在start里创建一个新的方法,方法名随意,这里就c_gb好了
- def c_gb
- @gb = Sprite.new
- @gb.bitmap = Cache.system("光标")
- end
复制代码
然后,需要dispose,在terminate里执行吧
- def terminate
- super
- d_gb
- end
复制代码
创建d_gb方法
然后需要设定x,y,z坐标吧?
那么,在c_gb方法里设定吧
- def c_gb
- @gb = Sprite.new
- @gb.bitmap = Cache.system("光标")
- @gb.z = 1000
- @gb.x = 300
- @gb.y = 300+@command_window.index * 30
- end
复制代码
设定z=1000,x=300,@command_window.index来获取光标的索引再乘以30(差不多一行的高度吧)再+300,总之这个坐标可以自己调整
设定完之后打开游戏一看,光标出现了,不过好像不动嘛,那么怎么办呢,那就update一下吧
- def update
- super
- @gb.update
- @gb.y = 300+@command_window.index * 30
- end
复制代码
@gb.update使光标更新,然后因为y坐标随时要变动所以要不断更新所以在update方法里也写一下y坐标,跟c_gb里的一样
那么,个性光标就完成啦,哦对了,别忘了把名为光标的素材放在Graphics里的System文件夹里...
接下来是去掉白边...
那就干脆透明一下好了
那么找到Window_TitleCommand
然后self.opacity = 0一下吧
最后,合起来的话。。。差不多就是这样啦
- class Scene_Title < Scene_Base
- def start
- super
- SceneManager.clear
- Graphics.freeze
- create_background
- create_foreground
- create_command_window
- c_gb
- play_title_music
- end
- def terminate
- super
- d_gb
- end
- def c_gb
- @gb = Sprite.new
- @gb.bitmap = Cache.system("光标")
- @gb.z = 1000
- @gb.x = 300
- @gb.y = 300+@command_window.index * 30
- end
- def update
- super
- @gb.update
- @gb.y = 300+@command_window.index * 30
- end
- def d_gb
- @gb.dispose
- end
- end
- class Window_TitleCommand < Window_Command
- def initialize
- super(0, 0)
- update_placement
- select_symbol(:continue) if continue_enabled
- self.openness = 0
- self.opacity = 0
- open
- end
- end
复制代码 |
评分
-
查看全部评分
|