refactoring
This commit is contained in:
+8
-8
@@ -211,22 +211,22 @@ local methods = {
|
|||||||
AddCell = function(self, rowNum)
|
AddCell = function(self, rowNum)
|
||||||
local row = self.rows[rowNum]
|
local row = self.rows[rowNum]
|
||||||
local colNum = getn(row.cols) + 1
|
local colNum = getn(row.cols) + 1
|
||||||
local col = CreateFrame('Frame', nil, row)
|
local cell = CreateFrame('Frame', nil, row)
|
||||||
local text = col:CreateFontString()
|
local text = cell:CreateFontString()
|
||||||
col.text = text
|
cell.text = text
|
||||||
text:SetFont(gui.font, ROW_TEXT_SIZE)
|
text:SetFont(gui.font, ROW_TEXT_SIZE)
|
||||||
text:SetJustifyV('CENTER')
|
text:SetJustifyV('CENTER')
|
||||||
text:SetPoint('TOPLEFT', 1, -1)
|
text:SetPoint('TOPLEFT', 1, -1)
|
||||||
text:SetPoint('BOTTOMRIGHT', -1, 1)
|
text:SetPoint('BOTTOMRIGHT', -1, 1)
|
||||||
col:SetHeight(ROW_HEIGHT)
|
cell:SetHeight(ROW_HEIGHT)
|
||||||
col.st = self
|
cell.st = self
|
||||||
|
|
||||||
if colNum == 1 then
|
if colNum == 1 then
|
||||||
col:SetPoint('TOPLEFT', 0, 0)
|
cell:SetPoint('TOPLEFT', 0, 0)
|
||||||
else
|
else
|
||||||
col:SetPoint('TOPLEFT', row.cols[colNum - 1], 'TOPRIGHT')
|
cell:SetPoint('TOPLEFT', row.cols[colNum - 1], 'TOPRIGHT')
|
||||||
end
|
end
|
||||||
tinsert(row.cols, col)
|
tinsert(row.cols, cell)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
AddRow = function(self)
|
AddRow = function(self)
|
||||||
|
|||||||
Reference in New Issue
Block a user