Scrollview not scrolling if finger drag starts inside/on a button

I have buttons inserted into a scrollview with events listening for onRelease of the buttons.

I don’t want the buttons to be clickable if a certain condition is met, but doing so prevents the scrollview from scrolling if the user’s finger/pointer begins the scroll from inside a button’s bounds.

Here is the onRelease listener:

local function onLevelButtonRelease(event)

    -- don't let the button be pressed if the level is locked
    if event.target.is_level_locked then
        return
    end

    -- otherwise, load the level
    local options = {
        params = {
            level = event.target.level
        }
    }

    composer.gotoScene("play", options)

end

Is there a way to propagate the touch event through an unclickable button and to the scrollview so that it scrolls even when the scroll starts from within a button’s bounds? or some other workaround?

Great, thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.