Skip to content

Commit 3813ad2

Browse files
committed
Prevent scrollover
Prevents going back to the top of the page when scrolling past the end and vice versa. Does the same for the menu.
1 parent f022976 commit 3813ad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SCRIPTS/BF/ui.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ local function incPage(inc)
150150
end
151151

152152
local function incLine(inc)
153-
currentLine = incMax(currentLine, inc, #(Page.fields))
153+
currentLine = clipValue(currentLine + inc, 1, #(Page.fields))
154154
end
155155

156156
local function incMenu(inc)
157-
menuActive = incMax(menuActive, inc, #(menuList))
157+
menuActive = clipValue(menuActive + inc, 1, #(menuList))
158158
end
159159

160160
local function requestPage()

0 commit comments

Comments
 (0)