SDLGUL自定义事件处理函数的使用
sdlgui吧
全部回复
仅看楼主
level 10
twtfcu3 楼主
视频教学地址
网盘链接
2014年05月31日 04点05分 1
level 10
twtfcu3 楼主
#include <SDL2/SDL.h>
#include "sdlgui/sdlgui.h"
using namespace std;
int frame_event(sdl_frame* obj,SDL_Event* e)
{
switch(e->type)
{
case SDL_MOUSEMOTION:
obj->fill_rect(NULL,e->motion.x*e->motion.y*200);
break;
}
}
int main(int argc, char * argv[])
{
sdl_frame f("sdlgui",100,100,600,600,SDL_WINDOW_SHOWN);
f.event(frame_event);
return f.run();
}
2014年05月31日 04点05分 2
level 10
twtfcu3 楼主
我要叫了
2014年05月31日 04点05分 3
2014年05月31日 05点05分
2014年05月31日 05点05分
2014年05月31日 05点05分
2014年05月31日 05点05分
1