1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add a user data to user event (optional)

This commit is contained in:
Mathieu Schroeter 2017-02-28 19:35:45 +01:00
parent e372c4cc6d
commit 4b55f8f92f
2 changed files with 3 additions and 3 deletions

View File

@ -5250,13 +5250,13 @@ void CEvent::IntroStep()
}
}
void CEvent::PushUserEvent (Sint32 code)
void CEvent::PushUserEvent (Sint32 code, void *data)
{
SDL_Event event;
event.type = SDL_USEREVENT;
event.user.code = code;
event.user.data1 = nullptr;
event.user.data1 = data;
event.user.data2 = nullptr;
SDL_PushEvent (&event);

View File

@ -113,7 +113,7 @@ public:
void IntroStep();
public:
static void PushUserEvent (Sint32 code);
static void PushUserEvent (Sint32 code, void *data = nullptr);
protected:
void DrawTextCenter (const char *text, Sint32 x, Sint32 y, Sint32 font = 0);