0 Favourites

How do I prevent a click from affecting multiple layers?

  • My game's main menu is structured with sub-menus that open as stacking layers. In the Open Profiles -> Manage Accounts stack, the Close Window button for both sub-menus occupies the same x/y space on two separate layers. However, when I click to close the Manage Accounts sub-menu/layer, the click affects the Profiles sub-menu close button as well, and both sub-menus/layers disappear.

    The events are structured in a way that prioritize the sub-menus based on visibility, so it's more or less written to do exactly what's happening. Is there a way to limit the input of the mouse click to prevent this input from going through layers? I can reform the sub-menus, sure, but if I can do it in events I'd like to know. Thanks in advance.

  • I've had this problem before...

    What I did was have a global variable... then each menu had a certain number...

    You could only click on the button when it's number was in the variable...

    You could also just move the menu buttons in and out when opening menus...

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I kind of had this problem before. Give my thread a read, and see the solutions further down (disregard thread title, just read further down/next page as well!).

    scirra.com/forum/viewtopic.php?f=147&t=162982&p=987237#p987237

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,734
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
0 Favourites
Isometric multiple floors
74 9,717
eleanorawesome's avatar
eleanorawesome