Forum rules - please read before posting.

Disabling a Menu by clicking outside of it

I have a cabinet in my 2d scene, with a hotspot over it. When I click on the cabinet an AC menu appears through the interaction actionlist on the hotspot which just turns on the menu. The menu right now is just a black square but it will have items and other stuff inside it in the future.

I have a button inside the menu that closes the menu when you click it, but I want to also have the menu close when I click outside of it (anywhere on the screen outside of the menu). What's the easiest way to go around this?

Comments

  • Welcome to the community, @Merkeyz.

    The easiest way to do this is to surround the Menu with invisible "Button" elements that turn the Menu off when clicked.

    This can either be done by:

    1. Extending your Menu to be full-screen (keeping the visible portion as it is), and then adding four invisible Buttons to pad each side
    2. Creating a separate Menu that has a single invisible Button that spans the screen, and turning it on at the same time as the original Menu. As Menus are processed in the order they are displayed in the Manager, you'll need to make sure this is underneath the original Menu in the stack so that clicks on the original Menu still register.
  • Works smoothly, Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.