diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-25 18:34:28 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-25 18:34:28 -0700 |
commit | 57ed70d9125a45c819302c23445732b1acc14e8f (patch) | |
tree | ccd275f88da1ad55475abcafadf968a4906452cc | |
parent | da932ce92dcf5930d3224c2179db41cf024f5169 (diff) | |
download | text.love-57ed70d9125a45c819302c23445732b1acc14e8f.tar.gz |
clean up some absolute coordinates
-rw-r--r-- | edit.lua | 2 | ||||
-rw-r--r-- | icons.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/edit.lua b/edit.lua index b894dde..2b405a7 100644 --- a/edit.lua +++ b/edit.lua @@ -168,7 +168,7 @@ function edit.draw(State) end if line.data == '' then -- button to insert new drawing - button(State, 'draw', {x=4,y=y+4, w=12,h=12, color={1,1,0}, + button(State, 'draw', {x=State.left-Margin_left+4, y=y+4, w=12,h=12, color={1,1,0}, icon = icon.insert_drawing, onpress1 = function() Drawing.before = snapshot(State, line_index-1, line_index) diff --git a/icons.lua b/icons.lua index e80f771..ddad704 100644 --- a/icons.lua +++ b/icons.lua @@ -4,8 +4,8 @@ function icon.insert_drawing(button_params) local x,y = button_params.x, button_params.y App.color(Icon_color) love.graphics.rectangle('line', x,y, 12,12) - love.graphics.line(4,y+6, 16,y+6) - love.graphics.line(10,y, 10,y+12) + love.graphics.line(x,y+6, x+12,y+6) + love.graphics.line(x+6,y, x+6,y+12) end function icon.hyperlink_decoration(button_params) |