get rid of pane transition animations

It seems hard and is also liable to put pressure on the settings menu.
This commit is contained in:
Kartik K. Agaram 2023-11-20 07:29:38 -08:00
parent 8718aa5f01
commit 5133d7c11f
5 changed files with 1 additions and 32 deletions

View File

@ -25,7 +25,6 @@ draw_menu = function()
onpress1 = function()
Current_pane_index = Current_pane_index-1
Current_pane = Panes[Current_pane_index]
animate(slide_canvas(Current_pane_index+1, 'right'))
end,
})
end
@ -40,7 +39,6 @@ draw_menu = function()
table.insert(Panes, new_pane())
Current_pane_index = Current_pane_index+1
Current_pane = Panes[Current_pane_index]
animate(slide_canvas(Current_pane_index-1, 'left'))
end,
})
else
@ -52,7 +50,6 @@ draw_menu = function()
onpress1 = function()
Current_pane_index = Current_pane_index+1
Current_pane = Panes[Current_pane_index]
animate(slide_canvas(Current_pane_index-1, 'left'))
end,
})
end

View File

@ -1,7 +1,6 @@
draw_canvas = function()
if Current_pane.canvas == nil then return end
love.graphics.setBlendMode('replace')
-- love.graphics.setBlendMode('alpha', 'premultiplied')
love.graphics.setBlendMode('alpha', 'premultiplied')
love.graphics.setColor(1,1,1,1)
love.graphics.draw(Current_pane.canvas, 0,0)
love.graphics.setBlendMode('alpha')

View File

@ -11,10 +11,7 @@ run_button = function()
Current_pane.canvas = love.graphics.newCanvas()
love.graphics.setCanvas(Current_pane.canvas)
love.graphics.push('all')
love.graphics.setBlendMode('replace')
love.graphics.setBackgroundColor(1,1,1)
love.graphics.setColor(1,1,1)
love.graphics.rectangle('fill', 0,0, App.screen.width, App.screen.height)
love.graphics.setColor(0,0,0)
Current_pane.output_editor_state.lines = {}
Text.redraw_all(Current_pane.output_editor_state)

View File

@ -1,17 +0,0 @@
slide_canvas = function(pane_index, dir)
local speed = App.screen.width/0.5/60 -- px/frame
return function()
end_frame()
if dir == 'right' then
for x=0,App.screen.width,speed do
draw_previous_canvas(Panes[pane_index].canvas, x)
end_frame()
end
elseif dir == 'left' then
for x=0,-App.screen.width,-speed do
draw_previous_canvas(Panes[pane_index].canvas, x)
end_frame()
end
end
end
end

View File

@ -1,7 +0,0 @@
draw_previous_canvas = function(canvas, x)
if canvas == nil then return end
love.graphics.setBlendMode('replace', 'premultiplied')
love.graphics.setColor(1,1,1,1)
love.graphics.draw(canvas, x,0)
love.graphics.setBlendMode('alpha')
end