14 lines
792 B
Plaintext
14 lines
792 B
Plaintext
draw_scrollbar = function(Editor_state)
|
|
App.color(Normal_color)
|
|
love.graphics.line(Editor_state.right+30, Editor_state.top, Editor_state.right+30, Editor_state.bottom)
|
|
love.graphics.line(Editor_state.right+25, Editor_state.top, Editor_state.right+35, Editor_state.top)
|
|
love.graphics.line(Editor_state.right+25, Editor_state.bottom, Editor_state.right+35, Editor_state.bottom)
|
|
local sbtop, sbbot = compute_scrollbar(Editor_state)
|
|
local topy = Editor_state.top + sbtop*(Editor_state.bottom - Editor_state.top)
|
|
local boty = Editor_state.top +sbbot*(Editor_state.bottom - Editor_state.top)
|
|
App.color{r=0.6, g=0.6, b=0.8, a=0.5}
|
|
love.graphics.rectangle('fill', Editor_state.right+15, topy+5, 30, math.max(boty-topy-10, 5))
|
|
Editor_scrollbar_top = topy
|
|
Editor_scrollbar_bottom = boty
|
|
end
|