mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Add columnlist:SetDefaultColumnWidth and columnlist:GetDefaultColumnWidth
This commit is contained in:
parent
c5157379ae
commit
8ee4ba4a74
@ -15,6 +15,7 @@ function newobject:initialize()
|
|||||||
self.type = "columnlist"
|
self.type = "columnlist"
|
||||||
self.width = 300
|
self.width = 300
|
||||||
self.height = 100
|
self.height = 100
|
||||||
|
self.defaultcolumnwidth = 100
|
||||||
self.columnheight = 16
|
self.columnheight = 16
|
||||||
self.buttonscrollamount = 200
|
self.buttonscrollamount = 200
|
||||||
self.mousewheelscrollamount = 1500
|
self.mousewheelscrollamount = 1500
|
||||||
@ -886,3 +887,24 @@ function newobject:ResizeColumns()
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[---------------------------------------------------------
|
||||||
|
- func: SetDefaultColumnWidth(width)
|
||||||
|
- desc: sets the object's default column width
|
||||||
|
--]]---------------------------------------------------------
|
||||||
|
function newobject:SetDefaultColumnWidth(width)
|
||||||
|
|
||||||
|
self.defaultcolumnwidth = width
|
||||||
|
return self
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[---------------------------------------------------------
|
||||||
|
- func: GetDefaultColumnWidth()
|
||||||
|
- desc: gets the object's default column width
|
||||||
|
--]]---------------------------------------------------------
|
||||||
|
function newobject:GetDefaultColumnWidth()
|
||||||
|
|
||||||
|
return self.defaultcolumnwidth
|
||||||
|
|
||||||
|
end
|
@ -16,7 +16,7 @@ function newobject:initialize(name, parent)
|
|||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.name = name
|
self.name = name
|
||||||
self.state = parent.state
|
self.state = parent.state
|
||||||
self.width = 80
|
self.width = parent.defaultcolumnwidth
|
||||||
self.height = parent.columnheight
|
self.height = parent.columnheight
|
||||||
self.columnid = 0
|
self.columnid = 0
|
||||||
self.hover = false
|
self.hover = false
|
||||||
|
Loading…
Reference in New Issue
Block a user