mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
Rename columnlistarea:GetVerticalScrollBar to columnlistarea:GetVerticalScrollBody
This commit is contained in:
parent
4991ba1f32
commit
f2d2a9d162
@ -11,7 +11,7 @@ Version 0.9.9 - Alpha (Release Date TBD)
|
|||||||
[ADDED] toggle functionality to the button object
|
[ADDED] toggle functionality to the button object
|
||||||
[ADDED] resizing functinality to the columnlistheader object
|
[ADDED] resizing functinality to the columnlistheader object
|
||||||
[ADDED] horizontal scrolling to the columnlist object
|
[ADDED] horizontal scrolling to the columnlist object
|
||||||
[ADDED] a new columnlistarea method: GetVerticalScrollBar()
|
[ADDED] a new columnlistarea method: GetVerticalScrollBody()
|
||||||
[ADDED] a new columnlistarea method: GetHorizontalScrollBar()
|
[ADDED] a new columnlistarea method: GetHorizontalScrollBar()
|
||||||
[ADDED] a new columnlist method: GetTotalColumnWidth()
|
[ADDED] a new columnlist method: GetTotalColumnWidth()
|
||||||
[ADDED] a new columnlist method: SetColumnWidth(id, width)
|
[ADDED] a new columnlist method: SetColumnWidth(id, width)
|
||||||
|
@ -110,13 +110,13 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local stencilfunc
|
local stencilfunc
|
||||||
local vbar = self.internals[1]:GetVerticalScrollBar()
|
local vbody = self.internals[1]:GetVerticalScrollBody()
|
||||||
local hbar = self.internals[1]:GetHorizontalScrollBar()
|
local hbar = self.internals[1]:GetHorizontalScrollBar()
|
||||||
local width = self.width
|
local width = self.width
|
||||||
local height = self.height
|
local height = self.height
|
||||||
|
|
||||||
if vbar then
|
if vbody then
|
||||||
width = width - vbar.width
|
width = width - vbody.width
|
||||||
end
|
end
|
||||||
|
|
||||||
if hbar then
|
if hbar then
|
||||||
@ -237,10 +237,10 @@ end
|
|||||||
function newobject:AdjustColumns()
|
function newobject:AdjustColumns()
|
||||||
|
|
||||||
local width = self.width
|
local width = self.width
|
||||||
local vbar = self.internals[1]:GetVerticalScrollBar()
|
local vbody = self.internals[1]:GetVerticalScrollBody()
|
||||||
|
|
||||||
if vbar then
|
if varea then
|
||||||
width = width - self.internals[1].internals[1].width
|
width = width - vbody.width
|
||||||
end
|
end
|
||||||
|
|
||||||
local children = self.children
|
local children = self.children
|
||||||
|
@ -110,7 +110,7 @@ function newobject:draw()
|
|||||||
local sheight = height
|
local sheight = height
|
||||||
|
|
||||||
if self.vbar then
|
if self.vbar then
|
||||||
swidth = swidth - self:GetVerticalScrollBar():GetWidth()
|
swidth = swidth - self:GetVerticalScrollBody():GetWidth()
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.hbar then
|
if self.hbar then
|
||||||
@ -250,20 +250,20 @@ function newobject:CalculateSize()
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if self.vbar then
|
if self.vbar then
|
||||||
self:GetVerticalScrollBar():Remove()
|
self:GetVerticalScrollBody():Remove()
|
||||||
self.vbar = false
|
self.vbar = false
|
||||||
self.offsety = 0
|
self.offsety = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local vbarwidth = 0
|
local vbarwidth = 0
|
||||||
local vbar = self:GetVerticalScrollBar()
|
local vbody = self:GetVerticalScrollBody()
|
||||||
if vbar then
|
if vbody then
|
||||||
vbarwidth = vbar.width
|
vbarwidth = vbody.width
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.itemwidth > (width - vbarwidth) then
|
if self.itemwidth > (width - vbarwidth) then
|
||||||
if vbar then
|
if vbody then
|
||||||
self.itemwidth = self.itemwidth + vbarwidth
|
self.itemwidth = self.itemwidth + vbarwidth
|
||||||
end
|
end
|
||||||
self.extrawidth = self.itemwidth - width
|
self.extrawidth = self.itemwidth - width
|
||||||
@ -299,18 +299,18 @@ function newobject:RedoLayout()
|
|||||||
v.staticx = 0
|
v.staticx = 0
|
||||||
v.staticy = starty
|
v.staticy = starty
|
||||||
if self.vbar then
|
if self.vbar then
|
||||||
local vbar = self:GetVerticalScrollBar()
|
local vbody = self:GetVerticalScrollBody()
|
||||||
vbar.staticx = self.width - vbar.width
|
vbody.staticx = self.width - vbody.width
|
||||||
if self.hbar then
|
if self.hbar then
|
||||||
vbar.height = self.height - self:GetHorizontalScrollBar().height
|
vbody.height = self.height - self:GetHorizontalScrollBar().height
|
||||||
else
|
else
|
||||||
vbar.height = self.height
|
vbody.height = self.height
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.hbar then
|
if self.hbar then
|
||||||
local hbar = self:GetHorizontalScrollBar()
|
local hbar = self:GetHorizontalScrollBar()
|
||||||
if self.vbar then
|
if self.vbody then
|
||||||
hbar.width = self.width - self:GetVerticalScrollBar().width
|
hbar.width = self.width - self:GetVerticalScrollBody().width
|
||||||
else
|
else
|
||||||
hbar.width = self.width
|
hbar.width = self.width
|
||||||
end
|
end
|
||||||
@ -409,10 +409,10 @@ function newobject:Clear()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--[[---------------------------------------------------------
|
--[[---------------------------------------------------------
|
||||||
- func: GetVerticalScrollBar()
|
- func: GetVerticalScrollBody()
|
||||||
- desc: gets the object's vertical scrollbar
|
- desc: gets the object's vertical scroll area
|
||||||
--]]---------------------------------------------------------
|
--]]---------------------------------------------------------
|
||||||
function newobject:GetVerticalScrollBar()
|
function newobject:GetVerticalScrollBody()
|
||||||
|
|
||||||
for k, v in ipairs(self.internals) do
|
for k, v in ipairs(self.internals) do
|
||||||
if v.bartype == "vertical" then
|
if v.bartype == "vertical" then
|
||||||
|
@ -70,10 +70,10 @@ function newobject:update(dt)
|
|||||||
local update = self.Update
|
local update = self.Update
|
||||||
local parent = self.parent
|
local parent = self.parent
|
||||||
local list = parent.internals[1]
|
local list = parent.internals[1]
|
||||||
local vbar = list:GetVerticalScrollBar()
|
local vbody = list:GetVerticalScrollBody()
|
||||||
local width = list.width
|
local width = list.width
|
||||||
if vbar then
|
if vbody then
|
||||||
width = width - vbar.width
|
width = width - vbody.width
|
||||||
end
|
end
|
||||||
|
|
||||||
self.clickbounds = {x = list.x, y = list.y, width = width, height = list.height}
|
self.clickbounds = {x = list.x, y = list.y, width = width, height = list.height}
|
||||||
|
Loading…
Reference in New Issue
Block a user