Skip to content

Commit 78c354a

Browse files
Co-authored-by: Blitz54 <Blitz54@users.noreply.github.com>
1 parent bcfd0d3 commit 78c354a

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

src/Export/Classes/RowListControl.lua

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function RowListClass:BuildColumns()
4747
wipeTable(self.colList)
4848
self.colList[1] = { width = 50, label = "#", font = "FIXED", sortable = true }
4949
for _, specCol in ipairs(main.curDatFile.spec) do
50-
t_insert(self.colList, {
51-
width = specCol.width,
50+
t_insert(self.colList, {
51+
width = specCol.width,
5252
specColRef = specCol, -- Link to the original data
53-
label = specCol.name,
53+
label = specCol.name,
5454
font = function() return IsKeyDown("ALT") and "FIXED" or "VAR" end,
5555
sortable = true
5656
})
@@ -108,7 +108,7 @@ function RowListClass:Draw(viewPort)
108108

109109
local cursorX, cursorY = GetCursorPos()
110110

111-
local label = self:GetProperty("label")
111+
local label = self:GetProperty("label")
112112
if label then
113113
DrawString(x + self.labelPositionOffset[1], y - 20 + self.labelPositionOffset[2], "LEFT", 16, self.font, label)
114114
end
@@ -360,3 +360,15 @@ function RowListClass:OnKeyUp(key, doubleClick)
360360
end
361361
return self
362362
end
363+
364+
function RowListClass:OnKeyDown(key, doubleClick)
365+
if key == "PAGEUP" then
366+
self.controls.scrollBarV:Scroll(-math.floor(self:GetRowRegion().height / self.rowHeight))
367+
return self
368+
elseif key == "PAGEDOWN" then
369+
self.controls.scrollBarV:Scroll(math.floor(self:GetRowRegion().height / self.rowHeight))
370+
return self
371+
end
372+
373+
return self.ListControl.OnKeyDown(self, key, doubleClick)
374+
end

0 commit comments

Comments
 (0)