diff options
Diffstat (limited to 'core/notifications.lua')
-rw-r--r-- | core/notifications.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/notifications.lua b/core/notifications.lua index ec0a1e1..26096ca 100644 --- a/core/notifications.lua +++ b/core/notifications.lua @@ -3,11 +3,15 @@ Timer = require("libs.hump.timer") require("core.constants") Notifications = Class { init = function(self, zoomFactor) - windowWidth, windowHeight = love.graphics.getDimensions() + self.calculateWindowDimensions() end, messages={} } +function Notifications:calculateWindowDimensions() + windowWidth, windowHeight = love.graphics.getDimensions() +end + function Notifications:update(dt) for i,obj in pairs(self.messages) do if obj.timer then |