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