Hiding the menu

Hi all, I have searched but not able to find a simple hide menu script/command. I've tried request (Hide, "ShowMenu") but its not working for me, is there another way. Please and Thank you.

What do you mean by hiding a menu? I assume from the description that you are using the ShowMenu function, but there is very little reason to do that unless you want to show a menu.

Do you want to hide a menu that has already been shown? In that case you could do:


but this is done automatically when the player either enters a command or chooses a menu option, so there should be no need to do it manually unless something like a timer is interrupting while a menu is on the screen.

If you want a menu to be active but not displayed on the screen (so that the player has to choose an option by typing a number), you could set the appropriate state manually by doing something like:

msg ("Pick a colour of the rainbow! Enter a number from 1 (red) to 6 (purple).")
game.menuoptions = Split("red;orange;yellow;green;blue;purple")
game.menuallowcancel = false
game.menucallback => {
  msg ("You picked " + result + "!")

If for some reason you want to hide a menu, but leave Quest expecting a response from it, you would do:


Hi mrangel, thanks for the quick response. Yes that's it, ClearMenu() does the trick, cant believe it but i knew it was simple. Couldn't figure that out. The idea is a menu on a laptop and the battery runs out after a few minutes. I wanted the laptop to shutdown and the menu to disappear so you couldn't choose anything but it was still remaining there after the laptop shutdown using various commands/scripts but it's gone now. So thanks again.

Log in to post a reply.