-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display.message_box()
#2427
display.message_box()
#2427
Conversation
Should we take the opportunity of this function moving modules (from a dead module) to rename it from |
Should we have some constants for the modes too? |
Should this be added in system instead of display? I think it would make sense there, especially since SDL3 will (probably) have support for (save, open file, open folder) file dialogs as well. |
I've supported having this in display in the past. Good point about SDL file dialogs though (libsdl-org/SDL#7445). They have a full implementation waiting in a PR. In the SDL implementation, the messagebox and file dialog systems are very separate: different API styles, different modules. Hence it will be okay for us to have messagebox in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, lets pull this in. I couldn't find anything wrong in testing.
Thanks for moving this forward!
Eventually it would be nice to have _sdl2.video.messagebox be a compat shim over this API, but that's for another pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR 🎉
Left two reviews that are nice-to-haves
@yunline I'm not sure why circleci is failing for you, maybe a rebase against main would fix it? This looks ready to merge, I left a tiny wording note and this needs to be squashed down to fewer commits before merging. |
remove `info`, `warn`, `error`
Co-authored-by: Dan Lawrence <[email protected]>
set the defaut value of return_button to 0 set the defaut value of return_button to None
for return_button and escape_button
That seems like a blocking function, it is really necessary to add things that cannot be ported on some platforms ? i mean was really video.messagebox used anyway ? |
As a replacement of
video.messagebox().
Examples: