Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Popups will now be updated like regular scenes.

  • Loading branch information...
commit 2ad15033962416b43fdf3a208f87d4d958453fd1 1 parent 29053bd
@GrahamRanson GrahamRanson authored
Showing with 13 additions and 8 deletions.
  1. +11 −6 GGScene.lua
  2. +2 −2 PopupC.lua
View
17 GGScene.lua
@@ -93,7 +93,7 @@ function GGScene:new( defaultTime, defaultEasing )
self.view = display.newGroup()
- -- Runtime:addEventListener( "enterFrame", self )
+ Runtime:addEventListener( "enterFrame", self )
return self
@@ -1097,11 +1097,16 @@ function GGScene:displayInformation( message )
end
--- Updates the current scene.
---function GGScene:enterFrame( event )
--- if self.currentScene and self.currentScene.isReady and self.currentScene[ "onUpdate" ] then
--- self.currentScene:onUpdate( event )
--- end
---end
+function GGScene:enterFrame( event )
+ if self.currentScene and self.currentScene.isReady and self.currentScene[ "onUpdate" ] then
+ self.currentScene:onUpdate( event )
+ end
+ for k, v in pairs( self.popups ) do
+ if v and v.isReady and v[ "onUpdate" ] then
+ v:onUpdate( event )
+ end
+ end
+end
--- Destroys this GGScene object.
function GGScene:destroy()
View
4 PopupC.lua
@@ -54,9 +54,9 @@ function PopupC:onCreate( data )
end
--- Called in the enterFrame event.
---function PopupC:onUpdate( event )
+function PopupC:onUpdate( event )
---end
+end
--- Called when the scene is about to get loaded.
function PopupC:onLoad()
Please sign in to comment.
Something went wrong with that request. Please try again.