13 lines
640 B
Plaintext
13 lines
640 B
Plaintext
draw_scrollbar = function(state)
|
|
App.color(Border_color)
|
|
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)
|
|
App.color{r=0.8, g=0.8, b=0.9}
|
|
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
|
|
end |