diff --git a/gamecore/screen.lua b/gamecore/screen.lua index fe23c7c..0cb4c6d 100644 --- a/gamecore/screen.lua +++ b/gamecore/screen.lua @@ -81,6 +81,19 @@ function ScreenManager:getDimensions() return self.width, self.height end +-- SCISSOR FUNCTIONS +-- Simple scissor functions + +function ScreenManager:setScissor(x, y, width, height) + local x, y = self:getScreenCoordinate(x, y) + love.graphics.setScissor(x, y, width*self.data.resolution, height*self.data.resolution) +end + +function ScreenManager:resetScissor() + love.graphics.setScissor( ) +end + + -- DRAW FUNCTIONS -- Apply draw functions to the scene