Pop.Box/extensions/utility.lua

16 lines
546 B
Lua
Raw Permalink Normal View History

2017-04-30 21:13:56 +00:00
local graphics
graphics = love.graphics
local sub, len
do
local _obj_0 = string
sub, len = _obj_0.sub, _obj_0.len
end
2017-04-30 23:40:29 +00:00
local path = sub(..., 1, len(...) - len("/extensions/utility"))
2017-04-30 21:13:56 +00:00
local element = require(tostring(path) .. "/elements/element")
element.__base.fill = function(self)
2017-05-01 01:01:19 +00:00
self.data.x = self.parent.data.x + self.parent.data.padding
self.data.y = self.parent.data.y + self.parent.data.padding
self.data.w = self.parent.data.w - self.parent.data.padding * 2
self.data.h = self.parent.data.h - self.parent.data.padding * 2
2017-04-30 21:13:56 +00:00
end