• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
add break = empty row build_rows() drop-in
Line 11: Line 11:  
},
 
},
 
_cell = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: ${text_align}; background-color: ${bg_color}; padding:5px 5px 5px 5px;" |${values.value}]],
 
_cell = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: ${text_align}; background-color: ${bg_color}; padding:5px 5px 5px 5px;" |${values.value}]],
 +
_empty_cell = [[|]],
 
_column_cell_templates = {
 
_column_cell_templates = {
 
},
 
},
Line 194: Line 195:  
)
 
)
 
end
 
end
 +
end
 +
end
 +
end
 +
 +
function BaseTable:build_rows_breaks_as_empty_rows()
 +
for index, row_values in ipairs(self._data_rows) do
 +
table.insert(self._rows, self._row_starter)
 +
if row_values == "break" then
 +
for i=1, #self._columns do
 +
table.insert(self._rows, self._empty_cell)
 +
end
 +
elseif row_values == "header" then
 +
table.insert(self._rows, self._header)
 +
elseif type(row_values) == "table" then
 +
for _, column in ipairs(self._columns) do
 +
if row_values[column] then
 +
table.insert(self._rows, format(self._column_cell_templates[column] or self._cell, row_values[column]))
 +
end
 +
end
 +
else
 +
table.insert(self._rows,
 +
format{self._cell,
 +
colspan = #self._columns, rowspan = 1,
 +
text_align = self._args[self._custom_row_prefix .. row_values .. self._text_align_suffix] or self._start_align,
 +
bg_color = self._args[self._custom_row_prefix .. row_values .. self._bg_color_suffix] or self._transparent,
 +
values = {
 +
value = self._args[self._custom_row_prefix .. row_values .. self._content_suffix] or "",
 +
},
 +
}
 +
)
 
end
 
end
 
end
 
end
Anonymous user

Navigation menu