forked from hkc/cc-stuff
1
0
Fork 0

Improve scrolling when short list

This commit is contained in:
Casey 2023-10-20 04:33:01 +03:00
parent 32caf7810e
commit 7e94bc4f0a
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 3 additions and 3 deletions

View File

@ -282,12 +282,12 @@ local mplayer = {
if self.screens[2].cursor > maxi then
self.screens[2].scroll = self.screens[2].cursor - (th - 3)
end
if self.screens[2].scroll < 0 then
self.screens[2].scroll = 0
end
if self.screens[2].scroll > #self.songs - (th - 3) then
self.screens[2].scroll = #self.songs - (th - 3)
end
if self.screens[2].scroll < 0 then
self.screens[2].scroll = 0
end
self.screens[2].textScroll = 0
end,
handleClick = function(self, x, y)