Files
PathOfBuilding/Export/Classes/SpecColListControl.lua
Openarl ce9c403aaf Initial commit for 1.4.132
- Added new gems, updated old ones
- Added new uniques
- Updated tree
- Updated item bases and mods
2019-03-10 00:22:04 +13:00

34 lines
872 B
Lua

-- Dat View
--
-- Class: Spec Col List
-- Spec column list control.
--
local ipairs = ipairs
local t_insert = table.insert
local t_remove = table.remove
local SpecColListClass = newClass("SpecColListControl", "ListControl", function(self, anchor, x, y, width, height)
self.ListControl(anchor, x, y, width, height, 14, false, true)
end)
function SpecColListClass:GetRowValue(column, index, specCol)
if column == 1 then
return #specCol.name > 0 and ("^7"..specCol.name) or "???"
end
end
function SpecColListClass:OnSelect(index, specCol)
main:SetCurrentCol(index)
end
function SpecColListClass:OnOrderChange()
main.curDatFile:OnSpecChanged()
main.controls.rowList:BuildColumns()
end
function SpecColListClass:OnSelDelete(index, specCol)
t_remove(self.list, index)
main:SetCurrentCol()
main.curDatFile:OnSpecChanged()
main.controls.rowList:BuildColumns()
end