| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 0 |
| 经验 | |
| 最后登录 | 2017-9-13 |
| 在线时间 | 784 小时 |
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 784 小时
- 注册时间
- 2013-1-4
- 回帖
- 1057
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
[pre lang="ruby" line="1"]class View_Title
attr_accessor :container
def initialize(viewprot)
@viewprot = viewprot
@background = RGUI::PictureBox.new(0, 0, 544, 480, @viewprot, Cache.background("bg"))
@background.move(0, 0, -100)
@button_start = RGUI::SpriteButton.new(100, 200, 30, 80, @viewprot, Cache.system("button1"))
@button_load = RGUI::SpriteButton.new(100, 240, 30, 80, @viewprot, Cache.system("button2"))
@button_exit = RGUI::SpriteButton.new(100, 280, 30, 80, @viewprot, Cache.system("button3"))
hash = {:background => @background, :button_start => @button_start, :button_load => @button_load, :button_exit => @button_exit}
@container = RGUI::Container.new(hash)
end
def update
@container.update
end
def dispose
@container.dispose
@viewprot.dispose
end
def method_missing(m,*arg,&block)
return instance_variable_get(m) ? @container[m] : super
end
end
class Scene_Title
def start
SceneManager.clear
play_title_music
@view = View_Title.new(Viewprot.new)
@view.container[2].set_forbid if DataManager.save_file_exists?
set_event
super
end
def update
@view.update
input_update unless scene_changing?
super
end
def terminate
@view.update
super
end
def transition_speed
return 20
end
def input_update
if Input.trigger?(DOWN) then
@view.container.down
end
if Input.trigger?(UP) then
@view.container.up
end
if Input.trigger?(C) then
@view.container.soure
end
end
def set_event
@view.container.button_start.event(:sure){Scene.goto(Scene_Menu)}
@view.container.button_load.event(:sure){Scene.goto(Scene_Load)}
@view.container.button_exit.event(:sure){exit}
end
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end[/pre]
嗯,就是之前提过的那个基于RGSS的GUI库。最近一直在写,不过白天要上班,还得抽时间搞导师找我做的项目,所以写的极慢(是你丫懒吧・゚( ノд`゚)
在这里打个预告,不出意外的话月底应该能出个测试版【估计bug满满
装完逼就跑,真他妈的刺激( ̄∇ ̄) |
评分
-
查看全部评分
|