mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +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] resizing functinality to the columnlistheader 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 columnlist method: GetTotalColumnWidth()
|
||||
[ADDED] a new columnlist method: SetColumnWidth(id, width)
|
||||
|
@ -110,13 +110,13 @@ function newobject:draw()
|
||||
end
|
||||
|
||||
local stencilfunc
|
||||
local vbar = self.internals[1]:GetVerticalScrollBar()
|
||||
local vbody = self.internals[1]:GetVerticalScrollBody()
|
||||
local hbar = self.internals[1]:GetHorizontalScrollBar()
|
||||
local width = self.width
|
||||
local height = self.height
|
||||
|
||||
if vbar then
|
||||
width = width - vbar.width
|
||||
if vbody then
|
||||
width = width - vbody.width
|
||||
end
|
||||
|
||||
if hbar then
|
||||
@ -237,10 +237,10 @@ end
|
||||
function newobject:AdjustColumns()
|
||||
|
||||
local width = self.width
|
||||
local vbar = self.internals[1]:GetVerticalScrollBar()
|
||||
local vbody = self.internals[1]:GetVerticalScrollBody()
|
||||
|
||||
if vbar then
|
||||
width = width - self.internals[1].internals[1].width
|
||||
if varea then
|
||||
width = width - vbody.width
|
||||
end
|
||||
|
||||
local children = self.children
|
||||
|
@ -110,7 +110,7 @@ function newobject:draw()
|
||||
local sheight = height
|
||||
|
||||
if self.vbar then
|
||||
swidth = swidth - self:GetVerticalScrollBar():GetWidth()
|
||||
swidth = swidth - self:GetVerticalScrollBody():GetWidth()
|
||||
end
|
||||
|
||||
if self.hbar then
|
||||
@ -250,20 +250,20 @@ function newobject:CalculateSize()
|
||||
end
|
||||
else
|
||||
if self.vbar then
|
||||
self:GetVerticalScrollBar():Remove()
|
||||
self:GetVerticalScrollBody():Remove()
|
||||
self.vbar = false
|
||||
self.offsety = 0
|
||||
end
|
||||
end
|
||||
|
||||
local vbarwidth = 0
|
||||
local vbar = self:GetVerticalScrollBar()
|
||||
if vbar then
|
||||
vbarwidth = vbar.width
|
||||
local vbody = self:GetVerticalScrollBody()
|
||||
if vbody then
|
||||
vbarwidth = vbody.width
|
||||
end
|
||||
|
||||
if self.itemwidth > (width - vbarwidth) then
|
||||
if vbar then
|
||||
if vbody then
|
||||
self.itemwidth = self.itemwidth + vbarwidth
|
||||
end
|
||||
self.extrawidth = self.itemwidth - width
|
||||
@ -299,18 +299,18 @@ function newobject:RedoLayout()
|
||||
v.staticx = 0
|
||||
v.staticy = starty
|
||||
if self.vbar then
|
||||
local vbar = self:GetVerticalScrollBar()
|
||||
vbar.staticx = self.width - vbar.width
|
||||
local vbody = self:GetVerticalScrollBody()
|
||||
vbody.staticx = self.width - vbody.width
|
||||
if self.hbar then
|
||||
vbar.height = self.height - self:GetHorizontalScrollBar().height
|
||||
vbody.height = self.height - self:GetHorizontalScrollBar().height
|
||||
else
|
||||
vbar.height = self.height
|
||||
vbody.height = self.height
|
||||
end
|
||||
end
|
||||
if self.hbar then
|
||||
local hbar = self:GetHorizontalScrollBar()
|
||||
if self.vbar then
|
||||
hbar.width = self.width - self:GetVerticalScrollBar().width
|
||||
if self.vbody then
|
||||
hbar.width = self.width - self:GetVerticalScrollBody().width
|
||||
else
|
||||
hbar.width = self.width
|
||||
end
|
||||
@ -409,10 +409,10 @@ function newobject:Clear()
|
||||
end
|
||||
|
||||
--[[---------------------------------------------------------
|
||||
- func: GetVerticalScrollBar()
|
||||
- desc: gets the object's vertical scrollbar
|
||||
- func: GetVerticalScrollBody()
|
||||
- desc: gets the object's vertical scroll area
|
||||
--]]---------------------------------------------------------
|
||||
function newobject:GetVerticalScrollBar()
|
||||
function newobject:GetVerticalScrollBody()
|
||||
|
||||
for k, v in ipairs(self.internals) do
|
||||
if v.bartype == "vertical" then
|
||||
|
@ -70,10 +70,10 @@ function newobject:update(dt)
|
||||
local update = self.Update
|
||||
local parent = self.parent
|
||||
local list = parent.internals[1]
|
||||
local vbar = list:GetVerticalScrollBar()
|
||||
local vbody = list:GetVerticalScrollBody()
|
||||
local width = list.width
|
||||
if vbar then
|
||||
width = width - vbar.width
|
||||
if vbody then
|
||||
width = width - vbody.width
|
||||
end
|
||||
|
||||
self.clickbounds = {x = list.x, y = list.y, width = width, height = list.height}
|
||||
|
Loading…
Reference in New Issue
Block a user