level 12
今天我们继续来做个实例来进一步了解button控件.
2016年04月29日 02点04分
1
level 12
我们要用imgbutton控件来模仿安卓的滑动解锁效果
2016年04月29日 02点04分
2
level 12
从函数名就可以猜到这是一个以图片做背景的Button
2016年04月29日 02点04分
3
level 12
来看看他的参数定义
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
和button函数一样,只不过第二个参数是一个SDL_Texture*纹理指针
这就是我们要显示的背景图片
2016年04月29日 03点04分
5