Archived
1
0
Fork 0

Implement scrolling

This commit is contained in:
Braiden Vasco 2017-07-21 12:25:17 +00:00
parent cf009fd11e
commit a1cea37cea

View file

@ -83,6 +83,12 @@ private
@active += 1
@active = 0 if @active >= @items.count
end
if @active < @top
@top = @active
elsif @active >= @top + @height
@top = @active - @height + 1
end
end
def render