From 42fd7b34757fb5b9e56883d4ec6ab07cb37522d7 Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Sat, 12 Jul 2014 17:49:38 -0400 Subject: [PATCH] Make sure that the base object is always the same size as the application window --- objects/base.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/objects/base.lua b/objects/base.lua index b6dd7c5..1e71f6a 100644 --- a/objects/base.lua +++ b/objects/base.lua @@ -38,6 +38,16 @@ function newobject:update(dt) return end + local width, height = love.graphics.getDimensions() + + if self.width ~= width then + self.width = width + end + + if self.height ~= height then + self.height = height + end + local children = self.children local internals = self.internals