Hi,
I have a simple question: I am using the button widget like so:
local button = widget.newButton({ id = "some-button", width = 60, height = 60, defaultFile = "images/button.png", onEvent = onButtonPressed });
and I want to apply a scale it when it’s pressed. I’m thinking of doing this here:
local function onButtonPressed(event) if (event.phase == "began") then -- Scale button object button:scale(0.8, 0.8) end if (event.phase == "ended") then -- Do something end end
I don’t supposed the button object is what is being passed into the function is it? It’s just triggering an event. Is there a way to scale the button when pressed began using the button id?
Thanks.