Button floats over button. They both click when I click the top one.

Ok, so I have a play button (“touch” listener) and a bubble that has a “touch” listener. The annoying thing is that when the bubble hovers over the small play button and I click the bubble (which is supposed to just generate a popup), it triggers both buttons … Ideally I want the bubble to be the “top” layer and therefore not have the play button get activated.

The majority of the time it never even hovers over the button. It’s just one of those small things that bug me and it would be better without IMO. I could set up boundaries to where it floats but I’d rather not. Does anyone have any quick fixes?

To prevent this you should return true in your listener function.

local function touchListener(event)
  -- Do something
  return true
end
2 Likes

Oh wow, that fixed it right up :slight_smile:
You’ve now fixed two of my problems lol. I’m a sophomore comp sci major currently, I’ve been using CoronaSDK/Solar2D for the past two years but this is my first game I’m actually developing to deploy on android. I seem to figure out most things on my own but this past week is the first time I’ve used the forums and it helps a lot, Thanks a bunch!