[SDL] Making a GUI system in SDL

Jukka-Pekka Manninen jmanninen at digitalchocolate.com
Tue Feb 12 00:42:50 PST 2008


> -----Original Message-----
> On Behalf Of L-28C
> Subject: [SDL] Making a GUI system in SDL
> 
...
> But here's the problem; how can this control (button) class let
> the main application know that it was clicked?

Some good answers posted already, but if you don't need the main app to handle the click immediately, you could also use these:

SDL_PushEvent: http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fPushEvent
SDL_UserEvent: http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fUserEvent

Then just handle your button action event in your regular event loop.

-- 
Jukka-Pekka Manninen
 


More information about the SDL mailing list