Ui enhancements 2.0 (#31)
* canvas overhaul * minor tweaks * list mode for overview * bugfixes + tweaks for editor 2.0 * minor tweaks * more editor work * refactor + new transitions * use layout() where appropriate and cleanup * mouse triple click + textEntry scroll ind * cleanup * cleanup + theme editor * color rework + cleanup * changes for deprecated ui methods * can now use named colors
This commit was merged in pull request #31.
This commit is contained in:
@@ -29,6 +29,7 @@ function UI.ScrollingGrid:getViewArea()
|
||||
height = self.pageSize, -- viewable height
|
||||
totalHeight = Util.size(self.values), -- total height
|
||||
offsetY = self.scrollOffset, -- scroll offset
|
||||
fill = not self.disableHeader and self.headerBackgroundColor,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -57,3 +58,21 @@ function UI.ScrollingGrid:setIndex(index)
|
||||
end
|
||||
UI.Grid.setIndex(self, index)
|
||||
end
|
||||
|
||||
function UI.ScrollingGrid.example()
|
||||
local values = { }
|
||||
for i = 1, 20 do
|
||||
table.insert(values, { key = 'key' .. i, value = 'value' .. i })
|
||||
end
|
||||
return UI.ScrollingGrid {
|
||||
values = values,
|
||||
sortColumn = 'key',
|
||||
columns = {
|
||||
{ heading = 'key', key = 'key' },
|
||||
{ heading = 'value', key = 'value' },
|
||||
},
|
||||
accelerators = {
|
||||
grid_select = 'custom_select',
|
||||
}
|
||||
}
|
||||
end
|
||||
Reference in New Issue
Block a user