Log drag and drop position updates in SDL test programs

This commit is contained in:
Sam Lantinga 2023-11-06 18:53:06 -08:00
parent 07cb7c10a1
commit dbcd390cdf
1 changed files with 6 additions and 3 deletions

View File

@ -1820,13 +1820,16 @@ static void SDLTest_PrintEvent(const SDL_Event *event)
SDL_Log("SDL EVENT: App entered the foreground");
break;
case SDL_EVENT_DROP_BEGIN:
SDL_Log("SDL EVENT: Drag and drop beginning");
SDL_Log("SDL EVENT: Drag and drop beginning in window %" SDL_PRIu32 "", event->drop.windowID);
break;
case SDL_EVENT_DROP_POSITION:
SDL_Log("SDL EVENT: Drag and drop moving in window %" SDL_PRIu32 ": %g,%g", event->drop.windowID, event->drop.x, event->drop.y);
break;
case SDL_EVENT_DROP_FILE:
SDL_Log("SDL EVENT: Drag and drop file: '%s'", event->drop.data);
SDL_Log("SDL EVENT: Drag and drop file in window %" SDL_PRIu32 ": '%s'", event->drop.windowID, event->drop.data);
break;
case SDL_EVENT_DROP_TEXT:
SDL_Log("SDL EVENT: Drag and drop text: '%s'", event->drop.data);
SDL_Log("SDL EVENT: Drag and drop text in window %" SDL_PRIu32 ": '%s'", event->drop.windowID, event->drop.data);
break;
case SDL_EVENT_DROP_COMPLETE:
SDL_Log("SDL EVENT: Drag and drop ending");