Is there a way to copy text from an SDL_MessageBox? I can select text in the displayed message but pressing Cmd-C does not copy it to the clipboard. Do I have to watch for that key combination in my event handler and call some function to copy the text? If so, what function?
I have two main uses for this: issue reporting and searches for help. The former can be accomplished by screen grabs, the latter not.
Since the message box pauses the thread while shown, I don’t think you can process any events.
You could copy the entire contents of the message to the clipboard before showing the window. (You could also catch previous contents of the clipboard before changing it, then pass them back in when the message box is closed)
Unfortunately this work-around cannot provide expected behavior if the user only selects part of the string.
On my Ubuntu, a right-click on the highlighted text provides a copy-text option in a menu.
I’m not sure why Cmd-C does not activate a copy of selected text as a default, but I can confirm the same behavior on Linux (no ctrl-c activation here either).