davek1979's Forum Posts

  • 3 posts
  • I think you could create a global variable to determine which button you clicked and determine which button is at the top based on the state of the global variable.

    That sounds like a workaround but hopefully there's a better solution. In fact, just using a delay in execution works fine.

  • You can set a layer to interactive, true or false. So you turn off the whole layer not the single button. Doing the entire layer makes sense to me.

    I hope this helps.

    yours

    winkr7

    I did not mention it but yes, the other layer is actually not interactive at the time of touch. Still the touch registers. As I said, the same touch registers on both buttons despite the other one not being interactive, visible, not even in the same spot as I move it away from screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I encountered this issue and I wonder what your take on it might be.

    1, make 2 overlapping buttons on separate layers

    2, register tap event handlers for both - make sure if one is visible and onscreen, the other is invisible and offscreen

    3, when a button is tapped, toggle their state

    Tap event seemingly executes on both buttons, despite one being offscreen at the time of tap. Things become clear when I put a delay between tap and handler.

    Once button1 is tapped, button2 is made visible and moved into place beneath button1. That same tap event then propagates into button2, executing the inverse logic - hence the perception of no change unless button1 is tapped outside the overlapping area.

    I don't think this behaviour is correct and would like your opinion.

  • 3 posts