Commits

Chris Klimas committed a8105a6

Don't watch anything by default

Comments (0)

Files changed (1)

zoetrope/debug/watch.lua

 DebugWatch = DebugInstrument:extend
 {
 	_watches = {},
+	visible = false,
 
 	onNew = function (self)
 		self.title.text = 'Watch'
 		self.values = self:add(Text:new{ font = self.font })
 		self.lineHeight = self.labels._fontObj:getHeight()
 
-		self:addExpression('love.timer.getFPS()', 'FPS')
-		self:addExpression('math.floor(collectgarbage("count") / 1024) .. "M"', 'Memory used')
-
 		debugger.watch = function (exp, label) self:addExpression(exp, label) end
 	end,
 
 	--		label - string label, defaults to expression
 
 	addExpression = function (self, expression, label)
+		self.visible = true
 		table.insert(self._watches, { label = label or expression,
 									  func = loadstring('return ' .. expression) })