So I am trying to create a button that will allow me to tap to show an inventory panel, then tap the button again to hide the inventory panel.
I have written a function that works for displaying the inventory in the correct location, can someone give me a tip on how to allow it to hide the panel if I press the button again. I am assuming i need to do some kind of boolean. Can someone give me an example to set me on the right path?
Thanks,
Blade…
[code]local function inventoryButtont ( event )
if event.phase == “release” and inventoryBox == closed then
audio.play(puckHitPaddle)
local inventoryBucket = display.newImage(“images/inventoryBucket.png” , 100, 700)
inventoryBox = open
end
[code]
end
[import]uid: 64906 topic_id: 10672 reply_id: 310672[/import]