| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 0 |
| 经验 | |
| 最后登录 | 2017-9-13 |
| 在线时间 | 784 小时 |
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 784 小时
- 注册时间
- 2013-1-4
- 回帖
- 1057
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
RMGUI?
这是效果图
左上角的是一个HUD,下面是六个按钮
hud差不多是这么个写法
hud的代码[pre lang="ruby" line="1" file="hud"] bg =[
{:type => 1,
:x => 62,
:y => 18,
:width => 100,
:height => 5,
:color1 => Color.new(228,53,58,255),
:color2 => Color.new(236,32,133,255)},
{:type => 1,
:x => 62,
:y => 28,
:width => 100,
:height => 5,
:color1 => Color.new(39,74,145,255),
:color2 => Color.new(144,235,253,255)}
]
@hud = GUI::Hud.new(1, Cache.system("hud"), @viewport, 0, 0, bg, []) [/pre]
然后这是按钮的
这是按钮[pre lang="ruby" line="1" file="button"] @button1 = GUI::SpriteButton.new(1, Cache.system("btn_1"), @viewport, 388, 376, 26,40)
@button2 = GUI::SpriteButton.new(2, Cache.system("btn_2"), @viewport, 414, 376, 26,40)
@button3 = GUI::SpriteButton.new(3, Cache.system("btn_3"), @viewport, 440, 376, 26,40)
@button4 = GUI::SpriteButton.new(4, Cache.system("btn_4"), @viewport, 466, 376, 26,40)
@button5 = GUI::SpriteButton.new(5, Cache.system("btn_5"), @viewport, 492, 376, 26,40)
@button6 = GUI::SpriteButton.new(6, Cache.system("btn_6"), @viewport, 518, 376, 26,40)
@container = GUI::Container.new(@button1, @button2, @button3, @button4, @button5, @button6)[/pre]
本质上是个对RGSS里的Sprite、Bitmap、Font这些类的一个封装,目前差不多有一个容器/布局器、一个图片按钮、一个HUD这么三个控件。
代码就不上传了。。。一是没写完,二是有些部分还要改改。
嗯就酱紫(ΦωΦ) |
|