1. Chris Klimas
  2. zoetrope

Commits

Chris Klimas  committed aa0c03c

Debug instruments only receive update events when the console is visible

  • Participants
  • Parent commits a8105a6
  • Branches default

Comments (0)

Files changed (1)

File zoetrope/debug/debugger.lua

View file
 			self:add(self.instruments.wide)
 		end,
 
-		onUpdate = function (self)
+		update = function (self, elapsed)
 			if the.keys:justPressed(debugger.consoleKey) then
 				if self.visible then
 					debugger.hideConsole()
 				end
 			end
 
+			for _, listener in pairs(self.listeners) do
+				listener()
+			end
+
 			if debugger.console.visible then
 				for spr, height in pairs(debugger.console._instrumentHeights) do
 					if height ~= spr.contentHeight then
 						debugger._resizeInstruments()
 					end
 				end
-			end
 
-			for _, listener in pairs(self.listeners) do
-				listener()
+				Group.update(self, elapsed)
 			end
 		end
 	}