diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-10-16 22:53:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-10-16 22:57:46 -0700 |
commit | 4b3f3595266729a16a2a5bdb2a480576d332c14c (patch) | |
tree | 8776a614abf1d0621284c2fb4808bcf59d1f2ed8 /source_edit.lua | |
parent | ea4a8379fe577207509719af41491190035fc8fa (diff) | |
download | lines.love-4b3f3595266729a16a2a5bdb2a480576d332c14c.tar.gz |
clearer API for drawing a button
Make it more obvious that the color passed in is just for the background. The icon will do the rest. r/g/b keys are more consistent with App.color().
Diffstat (limited to 'source_edit.lua')
-rw-r--r-- | source_edit.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source_edit.lua b/source_edit.lua index 2bf0697..12c2bae 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -188,7 +188,7 @@ function edit.draw(State, hide_cursor, show_line_numbers) if show_line_numbers then buttonx = 4 -- HACK: position draw buttons at a fixed x on screen end - button(State, 'draw', {x=buttonx, y=y+4, w=12,h=12, color={1,1,0}, + button(State, 'draw', {x=buttonx, y=y+4, w=12,h=12, bg={r=1,g=1,b=0}, icon = icon.insert_drawing, onpress1 = function() Drawing.before = snapshot(State, line_index-1, line_index) |