-- si la prise de photo n'est pas annulée
if newPhoto ~= nil then
-
+
+ photo:removeSelf()
+ photo = nil
+
local btn = prisePhoto.boutonPhoto
-- Une photo a été prise
-- masquer l'ancienne photo
local clear = display.newRect( 0, 0, btn.width, btn.height )
clear:setFillColor( 0, 0, 0 )
- clear.anchorX = 0
- clear.anchorY = 0
- -- prisePhoto:insert( clear )
+ clear.x = btn.x
+ clear.y = btn.y
+ prisePhoto:insert( clear )
-- nouvelle photo
photo = newPhoto
- photo.anchorX = 0
- photo.anchorY = 0
- photo.x = btn.x
- photo.y = btn.y
photo.width = 70
photo.height = 70
- photo.alpha = 1
+ photo.x = clear.x + 20
+ photo.y = clear.y + 60
ticket:insert( photo )
end