diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-06-12 08:26:37 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-06-12 09:04:21 -0700 |
commit | 059efba79d285e0760837f5b85dcaaae49c94f75 (patch) | |
tree | 040ea3e00c0a11465dd8ae3deccd297f06835e23 /main.lua | |
parent | 9ada7cf833616846c53c5e7c1c9c824e54e567d9 (diff) | |
download | view.love-059efba79d285e0760837f5b85dcaaae49c94f75.tar.gz |
override mouse state lookups in tests
If I'd had this stuff in my test harness earlier, two recent commits would have failed tests and given me early warning: ff88238ff1 ff88a2a927
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main.lua b/main.lua index 98d2707..227c149 100644 --- a/main.lua +++ b/main.lua @@ -446,7 +446,7 @@ function App.keychord_pressed(chord) save_to_disk(Lines, Filename) record_undo_event({before=before, after=snapshot(before_line, Cursor1.line)}) -- dispatch to drawing or text - elseif love.mouse.isDown('1') or chord:sub(1,2) == 'C-' then + elseif App.mouse_down('1') or chord:sub(1,2) == 'C-' then -- DON'T reset line.y here local drawing_index, drawing = Drawing.current_drawing() if drawing_index then @@ -455,12 +455,12 @@ function App.keychord_pressed(chord) record_undo_event({before=before, after=snapshot(drawing_index)}) save_to_disk(Lines, Filename) end - elseif chord == 'escape' and love.mouse.isDown('1') then + elseif chord == 'escape' and App.mouse_down('1') then local _,drawing = Drawing.current_drawing() if drawing then drawing.pending = {} end - elseif chord == 'escape' and not love.mouse.isDown('1') then + elseif chord == 'escape' and not App.mouse_down('1') then for _,line in ipairs(Lines) do if line.mode == 'drawing' then line.show_help = false |