Show message ext

Explanation
This will show your message string just like but will allow you to have up to 3 user-defined buttons instead of just the 'ok' button. The function returns the number of the button pressed. If the user presses the Esc key, a value of 0 is returned. In the button texts you can use the & symbol to indicate that the next character should be used as the keyboard shortcut for this button.

Example
level = show_message_ext("Choose Your Level","Level 1","Level 2","Level 3"); switch (level) { case 0: room_restart; break; case 1: room_goto(level_1); break; case 2: room_goto(level_2); break; case 3: room_goto(level_3); break; }

In the above example, if the user chose 'Level 2', as it is the second button, level would hold the number 2. If the user presses Esc, the value 0 (zero) is used.

In the texts you can use the & symbol to indicate that the next character should be used as the keyboard shortcut for this button. In the following example, O, S and D are the shortcuts: fileop = show_message_ext("File Operations","&Open File","&Save File","&Delete File");