enigma-dev/enigma-dev — pull request #50 by dazappa (2013-02-06 21:51:49+00:00)
Title: show_question and some stuff

If you couldn't guess from the modified files, this commit is Windows only

This commit implements show_question

This commit includes a skeleton for the function (obsolete in GM) show_message_ext. Actually implementing show_message_ext doesn't appear to be easy, because to get custom buttons it looks like you'd need to create a custom form for the job. Too lazy, but I thought I'd include the function header for someone else.

This commit changes the caption "Message" in show_message to the window's caption. show_question also has its caption set to the window caption. This behavior is what is in GM:S.

What might be confusing, is that it doesn't use room_caption. However, even though I cannot find any reference to room_caption being obsolete or deprecated in the manual in GM:S, it is removed from the room editor and changing room_caption does not change the window caption. However, in GM if you window_set_caption and show_message or show_question, those dialog boxes will have the window caption as their own title as well.

Of course this is personal preference as well. You can do whatever the hell you want with the caption. You could rip the show_question code, modify it to change the caption, and commit it yourself and reject this pull request. I dedicate my code to the public domain.

I have no idea what the hell is wrong with the diff. Maybe despite my best efforts, C::B or git ate your line endings? Points of interest. In the CPP file, lines 142-162. In the header, 60-62.