【SDL_UI教程】第六课 按钮的进阶
c4droid吧
全部回复
仅看楼主
level 12
简单aaaaaaa 楼主
今天我们继续来做个实例来进一步了解button控件.
2016年04月29日 02点04分 1
level 12
简单aaaaaaa 楼主
我们要用imgbutton控件来模仿安卓的滑动解锁效果
2016年04月29日 02点04分 2
level 12
简单aaaaaaa 楼主
从函数名就可以猜到这是一个以图片做背景的Button
2016年04月29日 02点04分 3
level 12
简单aaaaaaa 楼主
来看看他的参数定义
int imgbutton(SDL_Rect rect,SDL_Texture*tex,char*str,unsigned long int c,int size,int align)
2016年04月29日 02点04分 4
level 12
简单aaaaaaa 楼主
和button函数一样,只不过第二个参数是一个SDL_Texture*纹理指针
这就是我们要显示的背景图片
2016年04月29日 03点04分 5
level 12
简单aaaaaaa 楼主
以上是本课源码,随便写的[喷]
2016年04月29日 04点04分 7
level 12
简单aaaaaaa 楼主
2016年04月29日 04点04分 8
level 12
怎么没人[咦]
2016年04月29日 06点04分 9
level 7

2016年04月29日 11点04分 11
level 9
求第五课 地址
2016年04月29日 11点04分 12
吧内搜索 SDL_UI
2016年04月29日 11点04分
level 6
代码错误
2016年05月04日 04点05分 13
不清楚[滑稽]
2016年05月04日 05点05分
level 6
2016年05月05日 05点05分 14
level 6
第二个头文件没有[阴险]
2016年12月18日 00点12分 15
从第一课看起
2016年12月18日 00点12分
回复 简单aaaaaaa :c ++能用sdl 吗?我看一些是c 的风格
2016年12月18日 00点12分
@木心木心💨 能用,我是用c写的
2016年12月18日 00点12分
回复 简单aaaaaaa :那个头文件问题怎么解决啊
2016年12月18日 00点12分
level 5
教程失踪
2021年10月19日 23点10分 16
1