TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
493 stars 53 forks source link

love.window.showMessageBox #9

Open rm-code opened 8 years ago

rm-code commented 8 years ago

Would this be possible to implement?

TannerRogalsky commented 8 years ago

The simple case of love.window.showMessageBox( title, message, type, attachtowindow ) could be sort of emulated using window.alert.

The more complicated love.window.showMessageBox( title, message, buttonlist, type, attachtowindow ) doesn't have any contemporary in a browser.

Emscripten is spitting out some code for SDL_ShowMessageBox but it doesn't seem to be, you know, showing a message box. Let me look more into this.

TannerRogalsky commented 8 years ago

https://github.com/emscripten-ports/SDL2/blob/43a8e8d180a150444ee88e8a8c22790887a36ec5/src/video/SDL_video.c#L3508

There's no entry for Emscripten which is why, despite the code existing, it doesn't do anything particularly useful.

pablomayobre commented 8 years ago

Can't we do this with a modal? Done in HTML/CSS/JS?

That way there is more personalization, and also we can do the more complex signature as well love.window.showMessageBox( title, message, buttonlist, type, attachtowindow )

TannerRogalsky commented 8 years ago

@Positive07 Part of showMessageBox is that it interrupts/pauses program execution until the user interacts with the modal. I don't think there's a good way to do that without alert.