[Feature request/suggestion] Stop tap/click from propagating

0 favourites
  • 4 posts
From the Asset Store
High quality sound effect pack, in the following categories: Simple, negative, pozitive
  • Hi.

    It would be really useful to have a simple way of stopping taps/clicks from propagating to lower objects or layers.

    Whenever you have an on-screen toolbar or menu or a pop-up it is always a hassle to set up control variables to stop buttons from activating what's below them when tapped.

    Now to think of it, triggering the whole stack of overlapping objects is hardly ever the desired result.

    Just as an example, in Corona SDK you can "return true" in the click listener of an object, which, upon receiving it, immediately breaks the click event (thus it not triggering in any object below).

    I'm not sure if it is possible due to how touch/mouse events work in Corona, but it would be a very handy little feature.

  • Make a variable call it canbeclicked, set it to 0.

    Make a variable comparison, variable canbeclicked =1 do stuff

    Set the things you want to be clickable to 1

    If they are different objects use a family variable.

    Otherwise you would go by the zorder...

  • or just use a second AND condition "is on top"

    it will only pick the top most object

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • newt Yeah, that's what I meant by it's a hassle. When there are quite a few overlapping buttons/clickable object which change position it adds considerably to the development time to check and un-check things like a 'clickable' variable. Just thought it would be more convenient to just set a non-propagation property in the inspector or something.

    justifun Well that might come in handy! Thanks, I haven't thought of that.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)