Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Nov 19, 2023
1 parent a2bfd82 commit f8f9ce2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Misc/qs_pak/scripts/menus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ local function listpage_keypress(page, keycode)
return
end

print(cursor, topline)
--print(cursor, topline)

-- if cursor <= 0 then
-- cursor = entrycount
Expand All @@ -149,16 +149,16 @@ print(cursor, topline)
-- cursor = cursor < 1 and entrycount or cursor > entrycount and 1 or cursor
-- topline = topline < 1 and 1 or topline > entrycount and entrycount or topline

-- -- Make sure line under cursor is visible
-- if cursor < topline then
-- topline = cursor
-- elseif cursor > topline + listpage_maxlines - 1 then
-- topline = cursor - listpage_maxlines + 1
-- end
-- Make sure line under cursor is visible
if cursor < topline then
topline = cursor
elseif cursor > topline + listpage_maxlines - 1 then
topline = cursor - listpage_maxlines + 1
end

-- if topline + listpage_maxlines > entrycount then
-- topline = entrycount - listpage_maxlines + 1
-- end
if topline + listpage_maxlines > entrycount then
topline = entrycount - listpage_maxlines + 1
end

-- print(cursor, topline)
page.topline = topline
Expand Down

0 comments on commit f8f9ce2

Please sign in to comment.