removed passing pop around unneccessarily

This commit is contained in:
Fox 2016-03-30 11:10:44 -07:00
parent 5047d4443d
commit e2a14399bd
12 changed files with 18 additions and 18 deletions

View File

@ -70,11 +70,11 @@ do
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
_class_0 = setmetatable({
__init = function(self, pop, parent, background)
__init = function(self, parent, background)
if background == nil then
background = false
end
_class_0.__parent.__init(self, pop, parent)
_class_0.__parent.__init(self, parent)
self.background = background
end,
__base = _base_0,

View File

@ -169,7 +169,7 @@ do
}
_base_0.__index = _base_0
_class_0 = setmetatable({
__init = function(self, pop, parent)
__init = function(self, parent)
self.parent = parent
self.child = { }
if parent then

View File

@ -98,7 +98,7 @@ do
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
_class_0 = setmetatable({
__init = function(self, pop, parent, text, color)
__init = function(self, parent, text, color)
if text == nil then
text = ""
end
@ -110,7 +110,7 @@ do
255
}
end
_class_0.__parent.__init(self, pop, parent)
_class_0.__parent.__init(self, parent)
self.font = graphics.newFont(14)
self:setText(text)
self.color = color

View File

@ -63,7 +63,7 @@ pop.create = function(element, parent, ...)
if parent == nil then
parent = pop.screen
end
element = pop.elements[element](pop, parent, ...)
element = pop.elements[element](parent, ...)
if parent then
insert(parent.child, element)
end

View File

@ -70,11 +70,11 @@ do
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
_class_0 = setmetatable({
__init = function(self, pop, parent, background)
__init = function(self, parent, background)
if background == nil then
background = false
end
_class_0.__parent.__init(self, pop, parent)
_class_0.__parent.__init(self, parent)
self.background = background
end,
__base = _base_0,

View File

@ -169,7 +169,7 @@ do
}
_base_0.__index = _base_0
_class_0 = setmetatable({
__init = function(self, pop, parent)
__init = function(self, parent)
self.parent = parent
self.child = { }
if parent then

View File

@ -98,7 +98,7 @@ do
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
_class_0 = setmetatable({
__init = function(self, pop, parent, text, color)
__init = function(self, parent, text, color)
if text == nil then
text = ""
end
@ -110,7 +110,7 @@ do
255
}
end
_class_0.__parent.__init(self, pop, parent)
_class_0.__parent.__init(self, parent)
self.font = graphics.newFont(14)
self:setText(text)
self.color = color

View File

@ -63,7 +63,7 @@ pop.create = function(element, parent, ...)
if parent == nil then
parent = pop.screen
end
element = pop.elements[element](pop, parent, ...)
element = pop.elements[element](parent, ...)
if parent then
insert(parent.child, element)
end

View File

@ -5,8 +5,8 @@ path = sub ..., 1, len(...) - len "/box"
element = require "#{path}/element"
class box extends element
new: (pop, parent, background=false) =>
super pop, parent
new: (parent, background=false) =>
super parent
@background = background

View File

@ -2,7 +2,7 @@ import graphics from love
import floor from math
class element
new: (pop, parent) =>
new: (parent) =>
@parent = parent
@child = {}

View File

@ -12,8 +12,8 @@ class text extends element
else
return pop.create("text", parent, ...)
new: (pop, parent, text="", color={255,255,255,255}) =>
super pop, parent
new: (parent, text="", color={255,255,255,255}) =>
super parent
@font = graphics.newFont 14
@setText text

View File

@ -49,7 +49,7 @@ pop.load = ->
-- creates an element with specified parent (parent can be false)
pop.create = (element, parent=pop.screen, ...) ->
element = pop.elements[element](pop, parent, ...)
element = pop.elements[element](parent, ...)
if parent
insert parent.child, element