2023-11-19 04:34:51 +00:00
|
|
|
draw_scrollbar = function(state)
|
2023-11-18 12:20:09 +00:00
|
|
|
App.color(Normal_color)
|
2023-11-19 04:34:51 +00:00
|
|
|
love.graphics.line(state.right+30, state.top, state.right+30, state.bottom)
|
|
|
|
love.graphics.line(state.right+25, state.top, state.right+35, state.top)
|
|
|
|
love.graphics.line(state.right+25, state.bottom, state.right+35, state.bottom)
|
|
|
|
local sbtop, sbbot = compute_scrollbar(state)
|
|
|
|
local topy = state.top + sbtop*(state.bottom - state.top)
|
|
|
|
local boty = state.top +sbbot*(state.bottom - state.top)
|
2023-11-19 00:24:06 +00:00
|
|
|
App.color{r=0.8, g=0.8, b=0.9}
|
2023-11-19 04:34:51 +00:00
|
|
|
love.graphics.rectangle('fill', state.right+15, topy+5, 30, math.max(boty-topy-10, 5), 5,5)
|
|
|
|
state.scrollbar_top = topy
|
|
|
|
state.scrollbar_bottom = boty
|
2023-11-18 22:39:27 +00:00
|
|
|
end
|