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:
parent
e372c4cc6d
commit
4b55f8f92f
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user