Butons Click Order

I have created a group that contains 4 buttons.

How to get track which button gets pressed the first, the second, the third…ect

Because same buttons will be clicked different times & depeding on the order they get clicked user experince wil behave differently. Is there any easy way to achieve this in corona please?

Hi @blablu1212,

For this, I would suggest that you assign each button an ID that makes sense. Then, when each is pressed, you add that ID to a table, in order, something like this:

[lua]

local buttonsPressed = {}

local function onButtonTap( event )

   local thisID = event.target.id

   buttonsPressed[#buttonsPressed+1] = thisID

end

[/lua]

Best regards,

Brent

Hi @blablu1212,

For this, I would suggest that you assign each button an ID that makes sense. Then, when each is pressed, you add that ID to a table, in order, something like this:

[lua]

local buttonsPressed = {}

local function onButtonTap( event )

   local thisID = event.target.id

   buttonsPressed[#buttonsPressed+1] = thisID

end

[/lua]

Best regards,

Brent