Commits

Chris Klimas  committed c7c8ed9

Clamp drawing of instrument interior

  • Participants
  • Parent commits 61bc543

Comments (0)

Files changed (1)

File zoetrope/debug/instrument.lua

 		else
 			return self.contentHeight + self.titleBarHeight
 		end
+	end,
+
+	draw = function (self, x, y)
+		local sx, sy, sw, sh = love.graphics.getScissor()
+		love.graphics.setScissor(self.outerFrame.x - 1, self.outerFrame.y - 1,
+		                         self.outerFrame.width + 2, self.outerFrame.height + 2)
+		Group.draw(self, x, y)
+
+		if sx and sy then
+			love.graphics.setScissor(sx, sy, sw, sh)
+		else
+			love.graphics.setScissor()
+		end
 	end
 }