Rename columnlistarea:GetHorizontalScrollBar to columnlistarea:GetHorizontalScrollBody

This commit is contained in:
Kenny Shields 2014-08-23 15:44:40 -04:00
parent f2d2a9d162
commit ff339b0fcf
3 changed files with 19 additions and 19 deletions

View File

@ -12,7 +12,7 @@ Version 0.9.9 - Alpha (Release Date TBD)
[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: GetVerticalScrollBody() [ADDED] a new columnlistarea method: GetVerticalScrollBody()
[ADDED] a new columnlistarea method: GetHorizontalScrollBar() [ADDED] a new columnlistarea method: GetHorizontalScrollBody()
[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)
[ADDED] a new columnlist method: GetColumnWidth(id) [ADDED] a new columnlist method: GetColumnWidth(id)

View File

@ -111,7 +111,7 @@ function newobject:draw()
local stencilfunc local stencilfunc
local vbody = self.internals[1]:GetVerticalScrollBody() local vbody = self.internals[1]:GetVerticalScrollBody()
local hbar = self.internals[1]:GetHorizontalScrollBar() local hbody = self.internals[1]:GetHorizontalScrollBody()
local width = self.width local width = self.width
local height = self.height local height = self.height
@ -119,8 +119,8 @@ function newobject:draw()
width = width - vbody.width width = width - vbody.width
end end
if hbar then if hbody then
height = height - hbar.height height = height - hbody.height
end end
local stencilfunc = function() love.graphics.rectangle("fill", self.x, self.y, width, height) end local stencilfunc = function() love.graphics.rectangle("fill", self.x, self.y, width, height) end

View File

@ -114,7 +114,7 @@ function newobject:draw()
end end
if self.hbar then if self.hbar then
sheight = sheight - self:GetHorizontalScrollBar():GetHeight() sheight = sheight - self:GetHorizontalScrollBody():GetHeight()
end end
local stencilfunc = function() love.graphics.rectangle("fill", x, y, swidth, sheight) end local stencilfunc = function() love.graphics.rectangle("fill", x, y, swidth, sheight) end
@ -230,13 +230,13 @@ function newobject:CalculateSize()
self.itemwidth = parent:GetTotalColumnWidth() self.itemwidth = parent:GetTotalColumnWidth()
local hbarheight = 0 local hbarheight = 0
local hbar = self:GetHorizontalScrollBar() local hbody = self:GetHorizontalScrollBody()
if hbar then if hbody then
hbarheight = hbar.height hbarheight = hbody.height
end end
if self.itemheight > (height - hbarheight) then if self.itemheight > (height - hbarheight) then
if hbar then if hbody then
self.itemheight = self.itemheight + hbarheight self.itemheight = self.itemheight + hbarheight
end end
self.extraheight = self.itemheight - height self.extraheight = self.itemheight - height
@ -277,7 +277,7 @@ function newobject:CalculateSize()
end end
else else
if self.hbar then if self.hbar then
self:GetHorizontalScrollBar():Remove() self:GetHorizontalScrollBody():Remove()
self.hbar = false self.hbar = false
self.offsetx = 0 self.offsetx = 0
end end
@ -302,17 +302,17 @@ function newobject:RedoLayout()
local vbody = self:GetVerticalScrollBody() local vbody = self:GetVerticalScrollBody()
vbody.staticx = self.width - vbody.width vbody.staticx = self.width - vbody.width
if self.hbar then if self.hbar then
vbody.height = self.height - self:GetHorizontalScrollBar().height vbody.height = self.height - self:GetHorizontalScrollBody().height
else else
vbody.height = self.height vbody.height = self.height
end end
end end
if self.hbar then if self.hbar then
local hbar = self:GetHorizontalScrollBar() local hbody = self:GetHorizontalScrollBody()
if self.vbody then if self.vbar then
hbar.width = self.width - self:GetVerticalScrollBody().width hbody.width = self.width - self:GetVerticalScrollBody().width
else else
hbar.width = self.width hbody.width = self.width
end end
end end
starty = starty + v.height starty = starty + v.height
@ -410,7 +410,7 @@ end
--[[--------------------------------------------------------- --[[---------------------------------------------------------
- func: GetVerticalScrollBody() - func: GetVerticalScrollBody()
- desc: gets the object's vertical scroll area - desc: gets the object's vertical scroll body
--]]--------------------------------------------------------- --]]---------------------------------------------------------
function newobject:GetVerticalScrollBody() function newobject:GetVerticalScrollBody()
@ -425,10 +425,10 @@ function newobject:GetVerticalScrollBody()
end end
--[[--------------------------------------------------------- --[[---------------------------------------------------------
- func: GetHorizontalScrollBar() - func: GetHorizontalScrollBody()
- desc: gets the object's horizontal scrollbar - desc: gets the object's horizontal scroll body
--]]--------------------------------------------------------- --]]---------------------------------------------------------
function newobject:GetHorizontalScrollBar() function newobject:GetHorizontalScrollBody()
for k, v in ipairs(self.internals) do for k, v in ipairs(self.internals) do
if v.bartype == "horizontal" then if v.bartype == "horizontal" then