mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
Cleanup
This commit is contained in:
parent
a5f77dce96
commit
e80c59aa3b
@ -28,7 +28,6 @@ function newobject:initialize()
|
|||||||
self.OnClick = nil
|
self.OnClick = nil
|
||||||
self.groupIndex = 0
|
self.groupIndex = 0
|
||||||
self.checked = false
|
self.checked = false
|
||||||
self.mouseover = false
|
|
||||||
|
|
||||||
self:SetDrawFunc()
|
self:SetDrawFunc()
|
||||||
end
|
end
|
||||||
@ -62,8 +61,6 @@ function newobject:update(dt)
|
|||||||
local parent = self.parent
|
local parent = self.parent
|
||||||
local base = loveframes.base
|
local base = loveframes.base
|
||||||
local update = self.Update
|
local update = self.Update
|
||||||
local onmouseover = self.OnMouseOver
|
|
||||||
local onmouseout = self.OnMouseOut
|
|
||||||
|
|
||||||
if not hover then
|
if not hover then
|
||||||
self.down = false
|
self.down = false
|
||||||
|
@ -263,7 +263,7 @@ function newobject:CalculateSize()
|
|||||||
end
|
end
|
||||||
self.extraheight = self.itemheight - height
|
self.extraheight = self.itemheight - height
|
||||||
if not self.vbar then
|
if not self.vbar then
|
||||||
local newbar = loveframes.objects["scrollbody"]:new(self, "vertical", true)
|
local newbar = loveframes.objects["scrollbody"]:new(self, "vertical")
|
||||||
table.insert(self.internals, newbar)
|
table.insert(self.internals, newbar)
|
||||||
self.vbar = true
|
self.vbar = true
|
||||||
newbar:GetScrollBar().autoscroll = parent.autoscroll
|
newbar:GetScrollBar().autoscroll = parent.autoscroll
|
||||||
@ -290,7 +290,7 @@ function newobject:CalculateSize()
|
|||||||
end
|
end
|
||||||
self.extrawidth = self.itemwidth - width
|
self.extrawidth = self.itemwidth - width
|
||||||
if not self.hbar then
|
if not self.hbar then
|
||||||
local newbar = loveframes.objects["scrollbody"]:new(self, "horizontal", true)
|
local newbar = loveframes.objects["scrollbody"]:new(self, "horizontal")
|
||||||
table.insert(self.internals, newbar)
|
table.insert(self.internals, newbar)
|
||||||
self.hbar = true
|
self.hbar = true
|
||||||
self.itemheight = self.itemheight + newbar.height
|
self.itemheight = self.itemheight + newbar.height
|
||||||
|
@ -341,7 +341,7 @@ function newobject:CalculateSize()
|
|||||||
if self.itemheight > height then
|
if self.itemheight > height then
|
||||||
self.extraheight = self.itemheight - height
|
self.extraheight = self.itemheight - height
|
||||||
if not vbar then
|
if not vbar then
|
||||||
local scroll = loveframes.objects["scrollbody"]:new(self, "vertical", true)
|
local scroll = loveframes.objects["scrollbody"]:new(self, "vertical")
|
||||||
table.insert(self.internals, scroll)
|
table.insert(self.internals, scroll)
|
||||||
self.vbar = true
|
self.vbar = true
|
||||||
end
|
end
|
||||||
|
@ -98,8 +98,8 @@ function newobject:mousepressed(x, y, button)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.parent:SetOpen(bool)
|
self.parent:SetOpen(bool)
|
||||||
print("!")
|
--print("!")
|
||||||
print(self.parent.level)
|
--print(self.parent.level)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -183,7 +183,7 @@ function newobject:update(dt)
|
|||||||
local itemheight = self.itemheight
|
local itemheight = self.itemheight
|
||||||
if itemheight > height then
|
if itemheight > height then
|
||||||
if not vbar then
|
if not vbar then
|
||||||
local scrollbody = loveframes.objects["scrollbody"]:new(self, "vertical", true)
|
local scrollbody = loveframes.objects["scrollbody"]:new(self, "vertical")
|
||||||
scrollbody.internals[1].internals[1].autoscroll = self.autoscroll
|
scrollbody.internals[1].internals[1].autoscroll = self.autoscroll
|
||||||
table.insert(self.internals, scrollbody)
|
table.insert(self.internals, scrollbody)
|
||||||
self.vbar = true
|
self.vbar = true
|
||||||
@ -211,7 +211,7 @@ function newobject:update(dt)
|
|||||||
|
|
||||||
if itemwidth > width then
|
if itemwidth > width then
|
||||||
if not hbar then
|
if not hbar then
|
||||||
local scrollbody = loveframes.objects["scrollbody"]:new(self, "horizontal", true)
|
local scrollbody = loveframes.objects["scrollbody"]:new(self, "horizontal")
|
||||||
scrollbody.internals[1].internals[1].autoscroll = self.autoscroll
|
scrollbody.internals[1].internals[1].autoscroll = self.autoscroll
|
||||||
table.insert(self.internals, scrollbody)
|
table.insert(self.internals, scrollbody)
|
||||||
self.hbar = true
|
self.hbar = true
|
||||||
|
@ -92,7 +92,7 @@ function newobject:update(dt)
|
|||||||
|
|
||||||
if self.itemheight > self.height then
|
if self.itemheight > self.height then
|
||||||
if not self.vbar then
|
if not self.vbar then
|
||||||
local scrollbody = loveframes.objects["scrollbody"]:new(self, "vertical", true)
|
local scrollbody = loveframes.objects["scrollbody"]:new(self, "vertical")
|
||||||
table.insert(self.internals, scrollbody)
|
table.insert(self.internals, scrollbody)
|
||||||
self.vbar = true
|
self.vbar = true
|
||||||
if self.hbar then
|
if self.hbar then
|
||||||
@ -119,7 +119,7 @@ function newobject:update(dt)
|
|||||||
|
|
||||||
if self.itemwidth > self.width then
|
if self.itemwidth > self.width then
|
||||||
if not self.hbar then
|
if not self.hbar then
|
||||||
local scrollbody = loveframes.objects["scrollbody"]:new(self, "horizontal", true)
|
local scrollbody = loveframes.objects["scrollbody"]:new(self, "horizontal")
|
||||||
table.insert(self.internals, scrollbody)
|
table.insert(self.internals, scrollbody)
|
||||||
self.hbar = true
|
self.hbar = true
|
||||||
if self.vbar then
|
if self.vbar then
|
||||||
|
Loading…
Reference in New Issue
Block a user