show_question


描述

This function creates a pop-up message box with two buttons for "Yes" and "No". It returns true or false depending on which one of the two buttons the user presses.

NOTE: This function is for debug use only on Desktop targets, but is deprecated on all other targets.


语法:

show_question(str);

参数 描述
str The string to show in the pop-up question.


Returns:

Boolean


例如:

if score > 500
   {
   if show_question("Continue to next room?")
      {
      room_goto(rm_Level2);
      }
   else game_end();
   }

The above code will check the score and if it is over 500, it will ask the user if they wish to continue or not and if the "yes" button is clicked it will go to another room, but if the "no" button is selected it will end the game.