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_text.lua | |
parent | ea4a8379fe577207509719af41491190035fc8fa (diff) | |
download | text.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_text.lua')
-rw-r--r-- | source_text.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source_text.lua b/source_text.lua index df36266..fb5123a 100644 --- a/source_text.lua +++ b/source_text.lua @@ -34,7 +34,7 @@ function Text.draw(State, line_index, y, startpos, hide_cursor, show_line_number local s,e,filename = unpack(link_offsets) local lo, hi = Text.clip_wikiword_with_screen_line(line, line_cache, i, s, e) if lo then - button(State, 'link', {x=State.left+lo, y=y, w=hi-lo, h=State.line_height, color={1,1,1}, + button(State, 'link', {x=State.left+lo, y=y, w=hi-lo, h=State.line_height, bg={r=1,g=1,b=1}, icon = icon.hyperlink_decoration, onpress1 = function() if file_exists(filename) then |