bigger, better scrollbar

This commit is contained in:
jill 2021-09-19 23:13:08 +03:00
parent 98cf070830
commit ee2b499017

View file

@ -22,7 +22,7 @@ self.openDropdown = 0
local dropdownScroll = 0
local dropdownScrollE = 0
local scrollbarSize = 4
local scrollbarSize = 6
local function skeys(t)
local k = {}
@ -311,7 +311,7 @@ function self.render()
local scroll = math.abs(dropdownScrollE) / (#v.options - maxDropdown + 1)
local size = scrollbarSize
love.graphics.setColor(1, 1, 1, v.open)
love.graphics.setColor(1, 1, 1, 0.8 * v.open)
love.graphics.rectangle('fill', x + w - size, y + h + scroll * (1 - displayed) * (maxDropdown - 1) * h * v.open, size, displayed * (maxDropdown - 1) * h * v.open)
end
end