Mercurial > touhou
diff pytouhou/lib/sdl.pyx @ 531:a7dc55ad9380
Display important messages in popups, instead of the terminal.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 19 Dec 2013 00:44:18 +0100 |
parents | 7c3c90468996 |
children | 1abb6f7db8cc |
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx +++ b/pytouhou/lib/sdl.pyx @@ -351,3 +351,8 @@ cdef Uint32 get_ticks() nogil: cdef void delay(Uint32 ms) nogil: SDL_Delay(ms) + + +cpdef int show_simple_message_box(unicode message): + text = message.encode('UTF-8') + return SDL_ShowSimpleMessageBox(1, 'PyTouhou', text, NULL)