Merge template-live-editor

This commit is contained in:
Kartik K. Agaram 2023-04-16 11:20:19 -07:00
commit 673ac78d2c
316 changed files with 107 additions and 2442 deletions

1
0000-freewheeling-start Normal file
View File

@ -0,0 +1 @@
This file contains no definition, but is used as a marker in the save dir to indicate all definitions have been copied from the repo to the save dir.

View File

@ -1 +0,0 @@
{"fw_parent":0,"on":1}

View File

@ -1 +0,0 @@
{"on.draw":2,"fw_parent":1,"fw_app":"bf","on":1}

View File

@ -1,4 +0,0 @@
on.draw = function()
local margin=15
love.graphics.rectangle(margin, margin, App.screen.width-margin*2, App.screen.height-margin*2)
end

View File

@ -1 +0,0 @@
{"on.draw":3,"fw_parent":2,"fw_app":"bf","on":1}

View File

@ -1,4 +0,0 @@
on.draw = function()
local margin=15
love.graphics.rectangle('line', margin, margin, App.screen.width-margin*2, App.screen.height-margin*2)
end

View File

@ -1 +0,0 @@
{"on.draw":4,"fw_parent":3,"fw_app":"bf","on":1}

View File

@ -1,5 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
love.graphics.rectangle('line', margin, margin, App.screen.width-margin*2, App.screen.height-margin*2)
end

View File

@ -1 +0,0 @@
{"on.draw":5,"fw_parent":4,"fw_app":"bf","on":1}

View File

@ -1,5 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
love.graphics.rectangle('line', margin, margin, App.screen.width-margin*2, App.screen.height-margin*2, 5,5)
end

View File

@ -1 +0,0 @@
{"on.draw":6,"fw_parent":5,"fw_app":"bf","on":1}

View File

@ -1,5 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
love.graphics.rectangle('line', margin, margin, (App.screen.width-margin*4)/3, App.screen.height-margin*2, 5,5)
end

View File

@ -1 +0,0 @@
{"on.draw":7,"fw_parent":6,"fw_app":"bf","on":1}

View File

@ -1,7 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local num_panels = 3
local panel_width = (App.screen.width - margin * (num_panels+1)) / num_panels
love.graphics.rectangle('line', margin, margin, (App.screen.width-margin*4)/3, App.screen.height-margin*2, 5,5)
end

View File

@ -1 +0,0 @@
{"on.draw":8,"fw_parent":7,"fw_app":"bf","on":1}

View File

@ -1,7 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local num_panels_hor, num_panels_ver = 3, 1
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
love.graphics.rectangle('line', margin, margin, panel_width, App.screen.height-margin*2, 5,5)
end

View File

@ -1 +0,0 @@
{"on.draw":9,"fw_parent":8,"fw_app":"bf","on":1}

View File

@ -1,8 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local num_panels_hor, num_panels_ver = 3, 1
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
love.graphics.rectangle('line', margin, margin, panel_width, panel_height, 5,5)
end

View File

@ -1 +0,0 @@
{"on.draw":10,"fw_parent":9,"fw_app":"bf","on":1}

View File

@ -1,16 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local num_panels_hor, num_panels_ver = 3, 1
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i in 1,num_panels_ver do
x = 0
for j in 1,num_panels_hor do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
x = x + margin + panel_width
end
y = y + margin + panel_height
end
end

View File

View File

@ -1 +0,0 @@
{"on.draw":11,"fw_parent":10,"fw_app":"bf","on":1}

View File

@ -1,16 +0,0 @@
on.draw = function()
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local num_panels_hor, num_panels_ver = 3, 1
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_ver do
x = 0
for j = 1,num_panels_hor do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
x = x + margin + panel_width
end
y = y + margin + panel_height
end
end

View File

@ -1 +0,0 @@
{"on.draw":12,"fw_parent":11,"fw_app":"bf","on":1}

View File

@ -1,17 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 3, 2 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_ver do
x = 0
for j = 1,num_panels_hor do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
x = x + margin + panel_width
end
y = y + margin + panel_height
end
end

View File

@ -1 +0,0 @@
{"on.draw":13,"fw_parent":12,"fw_app":"bf","on":1}

View File

@ -1,17 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 5, 2 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_ver do
x = 0
for j = 1,num_panels_hor do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
x = x + margin + panel_width
end
y = y + margin + panel_height
end
end

View File

View File

@ -1 +0,0 @@
{"on.draw":14,"fw_parent":13,"fw_app":"bf","on":1}

View File

@ -1,17 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 3, 1 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_ver do
x = 0
for j = 1,num_panels_hor do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
x = x + margin + panel_width
end
y = y + margin + panel_height
end
end

View File

@ -1 +0,0 @@
{"on.draw":15,"fw_parent":14,"fw_app":"bf","on":1}

View File

@ -1,17 +1,7 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 3, 1 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_hor do
y = 0
for j = 1,num_panels_ver do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
draw_editor_panel(In)
draw_editor_panel(Code)
draw_editor_panel(Out)
draw_data(Data)
end

View File

@ -1 +0,0 @@
{"on.draw":16,"fw_parent":15,"fw_app":"bf","on":1}

View File

@ -1,17 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 3, 6 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_hor do
y = 0
for j = 1,num_panels_ver do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":17,"fw_parent":16,"fw_app":"bf","on":1}

View File

@ -1,17 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor, num_panels_ver = 3, 1 -- vary this
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local panel_height = (App.screen.height - margin * (num_panels_ver+1)) / num_panels_ver
local x,y = 0, 0
for i = 1,num_panels_hor do
y = 0
for j = 1,num_panels_ver do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":18,"fw_parent":17,"fw_app":"bf","on":1}

View File

@ -1,19 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor = 3
local num_panels_ver = {1,2,1} -- number of vertical panels by column
assert(#num_panels_ver == num_panels_hor)
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":19,"fw_parent":18,"fw_app":"bf","on":1}

View File

@ -1,19 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor = 3
local num_panels_ver = {1,2,1} -- number of vertical panels by column
assert(#num_panels_ver == num_panels_hor)
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":20,"fw_parent":19,"fw_app":"bf","on":1}

View File

@ -1,19 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized panels
local num_panels_hor = 3
local num_panels_ver = {3,4,1} -- number of vertical panels by column
assert(#num_panels_ver == num_panels_hor)
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":21,"fw_parent":20,"fw_app":"bf","on":1}

View File

View File

@ -1,19 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized columns, each containing some number of equally-sized panels
local num_panels_hor = 3
local num_panels_ver = {3,4,1} -- number of vertical panels by column
assert(#num_panels_ver == num_panels_hor)
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"on.draw":22,"fw_parent":21,"fw_app":"bf","on":1}

View File

@ -1,19 +0,0 @@
on.draw = function()
-- draw a grid of equally-sized columns, each containing some number of equally-sized panels
local num_panels_hor = 3
local num_panels_ver = {1,2,1} -- number of vertical panels by column
assert(#num_panels_ver == num_panels_hor)
App.color{r=0.5,g=0.5,b=0.5}
local margin=15
local panel_width = (App.screen.width - margin * (num_panels_hor+1)) / num_panels_hor
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"fw_app":"bf","on":1,"on.draw":22,"fw_parent":22,"Num_panels_horizontal":23}

View File

@ -1 +0,0 @@
{"fw_app":"bf","on":1,"on.draw":22,"Num_panels_vertical":24,"fw_parent":23,"Num_panels_horizontal":23}

View File

@ -1 +0,0 @@
{"fw_app":"bf","on":1,"on.initialize":25,"on.draw":22,"Num_panels_vertical":24,"fw_parent":24,"Num_panels_horizontal":23}

View File

@ -1,3 +0,0 @@
on.initialize = function()
love.graphics.setFont(20)
end

View File

@ -1 +0,0 @@
{"fw_app":"bf","on":1,"on.initialize":26,"on.draw":22,"Num_panels_vertical":24,"fw_parent":25,"Num_panels_horizontal":23}

View File

@ -1,3 +0,0 @@
on.initialize = function()
love.graphics.setFont(love.graphics.newFont(20))
end

View File

@ -1 +0,0 @@
{"fw_app":"bf","Margin":27,"on":1,"on.initialize":26,"on.draw":22,"Num_panels_vertical":24,"fw_parent":26,"Num_panels_horizontal":23}

View File

@ -1 +0,0 @@
{"on.initialize":26,"on.draw":22,"Num_panels_vertical":24,"fw_app":"bf","Margin":27,"Font_size":28,"Num_panels_horizontal":23,"fw_parent":27,"on":1}

View File

@ -1 +0,0 @@
{"on.initialize":29,"on.draw":22,"Num_panels_vertical":24,"fw_app":"bf","Margin":27,"Font_size":28,"Num_panels_horizontal":23,"fw_parent":28,"on":1}

View File

@ -1,4 +0,0 @@
on.initialize = function()
local font = love.graphics.newFont(Font_size)
love.graphics.setFont(font)
end

View File

@ -1,7 +0,0 @@
create_editor = function(col, row)
local panel_width = (App.screen.width - Margin * (Num_panels_horizontal + 1)) / Num_panels_horizontal
local left = (col - 1) * (Margin + panel_width) + Margin
local panel_height = (App.screen.height - Margin * (Num_panels_vertical[col]+1)) / Num_panels_vertical[col]
local top = (row - 1) * (Margin + panel_height) + Margin
return edit.initialize_state(top, left, left+panel_width, Font_size, math.floor(Font_size*1.3))
end

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":29,"on.draw":22,"Num_panels_vertical":24,"fw_app":"bf","Margin":27,"Font_size":28,"Num_panels_horizontal":23,"fw_parent":29,"on":1}

View File

@ -1 +0,0 @@
Code = nil -- editor for code editor in middle column, top half

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":29,"on.draw":22,"Num_panels_vertical":24,"fw_app":"bf","Margin":27,"Code":31,"Font_size":28,"Num_panels_horizontal":23,"fw_parent":30,"on":1}

View File

@ -1 +0,0 @@
In = nil -- left column

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":29,"on.draw":22,"Num_panels_vertical":24,"fw_app":"bf","In":32,"Margin":27,"Code":31,"Font_size":28,"Num_panels_horizontal":23,"fw_parent":31,"on":1}

View File

@ -1 +0,0 @@
Out = nil -- right column

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":29,"on.draw":22,"Num_panels_vertical":24,"Font_size":28,"fw_app":"bf","In":32,"Margin":27,"Code":31,"Out":33,"Num_panels_horizontal":23,"fw_parent":32,"on":1}

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":34,"on.draw":22,"Num_panels_vertical":24,"Font_size":28,"fw_app":"bf","In":32,"Margin":27,"Code":31,"Out":33,"Num_panels_horizontal":23,"fw_parent":33,"on":1}

View File

@ -1,8 +0,0 @@
on.initialize = function()
local font = love.graphics.newFont(Font_size)
love.graphics.setFont(font)
In = create_editor(1, 1)
Code = create_editor(2, 1)
Data = create_editor(2, 2)
Out = create_editor(3, 1)
end

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":34,"on.draw":35,"Num_panels_vertical":24,"Font_size":28,"fw_app":"bf","In":32,"Margin":27,"Code":31,"Out":33,"Num_panels_horizontal":23,"fw_parent":34,"on":1}

View File

@ -1,19 +0,0 @@
on.draw = function()
edit.draw(In)
edit.draw(Code)
edit.draw(Data)
edit.draw(Out)
assert(#Num_panels_vertical == num_panels_horizontal)
App.color{r=0.5,g=0.5,b=0.5}
local panel_width = (App.screen.width - Margin * (Num_panels_horizontal+1)) / Num_panels_horizontal
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
end

View File

@ -1 +0,0 @@
{"create_editor":30,"on.initialize":36,"on.draw":35,"Num_panels_vertical":24,"Font_size":28,"fw_app":"bf","In":32,"Margin":27,"Code":31,"Out":33,"Num_panels_horizontal":23,"fw_parent":35,"on":1}

View File

@ -1,9 +0,0 @@
on.initialize = function()
local font = love.graphics.newFont(Font_size)
love.graphics.setFont(font)
In = create_editor(1, 1)
Code = create_editor(2, 1)
print(Code)
Data = create_editor(2, 2)
Out = create_editor(3, 1)
end

View File

@ -1,9 +0,0 @@
create_editor = function(col, row)
local panel_width = (App.screen.width - Margin * (Num_panels_horizontal + 1)) / Num_panels_horizontal
local left = (col - 1) * (Margin + panel_width) + Margin
local panel_height = (App.screen.height - Margin * (Num_panels_vertical[col]+1)) / Num_panels_vertical[col]
local top = (row - 1) * (Margin + panel_height) + Margin
local result = edit.initialize_state(top, left, left+panel_width, Font_size, math.floor(Font_size*1.3))
Text.redraw_all(result)
return result
end

View File

@ -1 +0,0 @@
{"on.initialize":36,"on":1,"Margin":27,"Font_size":28,"on.draw":35,"fw_app":"bf","create_editor":37,"Code":31,"fw_parent":36,"In":32,"Num_panels_horizontal":23,"Num_panels_vertical":24,"Out":33}

View File

@ -1 +0,0 @@
{"In":32,"on":1,"Out":33,"on.initialize":36,"Cursor":38,"Num_panels_vertical":24,"Margin":27,"Num_panels_horizontal":23,"Font_size":28,"on.draw":35,"fw_parent":37,"create_editor":37,"fw_app":"bf","Code":31}

View File

@ -1 +0,0 @@
{"In":32,"on":1,"Out":33,"on.initialize":36,"Cursor":38,"Num_panels_vertical":24,"Margin":27,"Num_panels_horizontal":23,"Font_size":28,"on.draw":39,"fw_parent":38,"create_editor":37,"fw_app":"bf","Code":31}

View File

@ -1,19 +0,0 @@
on.draw = function()
assert(#Num_panels_vertical == num_panels_horizontal)
App.color{r=0.5,g=0.5,b=0.5}
local panel_width = (App.screen.width - Margin * (Num_panels_horizontal+1)) / Num_panels_horizontal
local x = 0
for i = 1,num_panels_hor do
local panel_height = (App.screen.height - margin * (num_panels_ver[i]+1)) / num_panels_ver[i]
local y = 0
for j = 1,num_panels_ver[i] do
love.graphics.rectangle('line', x+margin, y+margin, panel_width, panel_height, 5,5)
y = y + margin + panel_height
end
x = x + margin + panel_width
end
edit.draw(In, Text_color, Cursor == In)
edit.draw(Code, Text_color, Cursor == Code)
edit.draw(Data, Text_color, Cursor == Data)
edit.draw(Out, Text_color, Cursor == Out)
end

View File

@ -1 +0,0 @@
{"Out":33,"on.initialize":36,"Num_panels_vertical":24,"Margin":27,"fw_app":"bf","Font_size":28,"Cursor":38,"fw_parent":39,"create_editor":37,"on.draw":40,"Code":31,"In":32,"Num_panels_horizontal":23,"on":1}

Some files were not shown because too many files have changed in this diff Show More