Merge template-live-editor
This commit is contained in:
commit
d1644c0615
|
@ -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.
|
|
@ -1 +0,0 @@
|
|||
{"fw_parent":0,"on":1}
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"fw_app":"spell-cards","Mode":2,"fw_parent":1}
|
|
@ -1,2 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"Mode":2,"fw_parent":2,"on":1,"fw_app":"spell-cards","draw_teach_screen":3}
|
|
@ -1,2 +0,0 @@
|
|||
draw_learn_screen = function()
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"Mode":2,"fw_parent":3,"on":1,"fw_app":"spell-cards","draw_teach_screen":3,"draw_learn_screen":4}
|
|
@ -1 +0,0 @@
|
|||
{"Mode":2,"draw_learn_screen":4,"fw_parent":4,"on":1,"fw_app":"spell-cards","draw_teach_screen":3,"on.draw":5}
|
|
@ -1 +0,0 @@
|
|||
Words = {'cat', 'mat', 'hat'}
|
|
@ -1 +0,0 @@
|
|||
{"Words":6,"Mode":2,"draw_learn_screen":4,"fw_parent":5,"on":1,"fw_app":"spell-cards","draw_teach_screen":3,"on.draw":5}
|
|
@ -1 +0,0 @@
|
|||
{"Words":6,"on.initialize":7,"Mode":2,"fw_app":"spell-cards","fw_parent":6,"on":1,"draw_learn_screen":4,"draw_teach_screen":3,"on.draw":5}
|
|
@ -1,5 +0,0 @@
|
|||
on.initialize = function(arg)
|
||||
Font_height = 20
|
||||
love.graphics.setFont(love.graphics.newFont(Font_height))
|
||||
Line_height = math.floor(Font_height * 1.3)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"Words":6,"Font_height":8,"on.initialize":7,"Mode":2,"fw_app":"spell-cards","fw_parent":7,"on":1,"draw_learn_screen":4,"draw_teach_screen":3,"on.draw":5}
|
|
@ -1 +0,0 @@
|
|||
{"Words":6,"Line_height":9,"Font_height":8,"on.initialize":7,"Mode":2,"fw_app":"spell-cards","fw_parent":8,"on":1,"draw_learn_screen":4,"draw_teach_screen":3,"on.draw":5}
|
|
@ -1,3 +0,0 @@
|
|||
draw_word = function(word, x,y)
|
||||
App.screen.print(word, x,y)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"fw_app":"spell-cards","Words":6,"Line_height":9,"Font_height":8,"on.initialize":7,"Mode":2,"draw_word":10,"fw_parent":9,"on":1,"draw_learn_screen":4,"draw_teach_screen":3,"on.draw":5}
|
|
@ -1,7 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
local y = 50
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"fw_app":"spell-cards","Words":6,"Line_height":9,"Font_height":8,"on.initialize":7,"Mode":2,"draw_word":10,"fw_parent":10,"on":1,"draw_learn_screen":4,"draw_teach_screen":11,"on.draw":5}
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":11,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":10,"Mode":2,"fw_parent":11}
|
|
@ -1,3 +0,0 @@
|
|||
draw_word = function(word, x,y)
|
||||
App.screen.print(word.data, x,y)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":11,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":12}
|
|
@ -1,10 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
love.graphics.rectangle(20, 5, 50, 25)
|
||||
local y = 50
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":14,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":13}
|
|
@ -1,10 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
love.graphics.rectangle('fill', 20, 5, 50, 25)
|
||||
local y = 50
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":15,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":14}
|
|
@ -1,11 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
love.graphics.rectangle('fill', 20, 5, 50, 25)
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
App.screen.print('new word (ctrl+n)', 22, 7)
|
||||
local y = 50
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":16,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":15}
|
|
@ -1,14 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
local cmd = 'new word (ctrl+n)'
|
||||
local cmd_text = to_text(cmd)
|
||||
local cmd_width = App.width(cmd_text)
|
||||
love.graphics.rectangle('fill', 20, 5, cmd_width+4, 25)
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
App.screen.print(cmd, 22, 7)
|
||||
local y = 50
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":17,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":16}
|
|
@ -1,14 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
local cmd = 'new word (ctrl+n)'
|
||||
local cmd_text = to_text(cmd)
|
||||
local cmd_width = App.width(cmd_text)
|
||||
love.graphics.rectangle('fill', 20, 5, cmd_width+10, Line_height+10)
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
App.screen.print(cmd, 20+5, 5+5)
|
||||
local y = 50
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word, 20, y)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":17}
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"Font_height":8,"on.mouse_press":19,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":18}
|
|
@ -1,2 +0,0 @@
|
|||
on.mouse_press = function(x,y, mouse_button)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on":1,"on.initialize":7,"on.mouse_release":20,"Font_height":8,"on.mouse_press":19,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":19}
|
|
@ -1,2 +0,0 @@
|
|||
on.mouse_release = function(x,y, mouse_button)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.keychord_press":21,"Words":12,"on":1,"on.initialize":7,"on.mouse_release":20,"Font_height":8,"on.mouse_press":19,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":20}
|
|
@ -1,2 +0,0 @@
|
|||
on.keychord_press = function(chord, key)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.key_release":22,"on.draw":5,"on.keychord_press":21,"Words":12,"on":1,"on.initialize":7,"on.mouse_release":20,"Font_height":8,"on.mouse_press":19,"Line_height":9,"draw_word":13,"Mode":2,"fw_parent":21}
|
|
@ -1,2 +0,0 @@
|
|||
on.key_release = function(key, scancode)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":22,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":19,"draw_word":13,"on.keychord_press":21}
|
|
@ -1,2 +0,0 @@
|
|||
on.text_input = function(t)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":23,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":19,"draw_word":13,"on.keychord_press":21}
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":24,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":19,"draw_word":13,"on.keychord_press":25}
|
|
@ -1,5 +0,0 @@
|
|||
on.keychord_press = function(chord, key)
|
||||
if chord == 'C-n' then
|
||||
new_word()
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":25,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":26,"draw_word":13,"on.keychord_press":25}
|
|
@ -1,6 +0,0 @@
|
|||
on.mouse_press = function(x,y, mouse_button)
|
||||
if x >= 20 and x < 20+App.width(to_text('new word (ctrl+n)')) + 10 and
|
||||
y >= 5 and y < 5 + Line_height + 10 then
|
||||
add_word()
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":26,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":27,"draw_word":13,"on.keychord_press":25}
|
|
@ -1,6 +0,0 @@
|
|||
on.mouse_press = function(x,y, mouse_button)
|
||||
if x >= 20 and x < 20+App.width(to_text('new word (ctrl+n)')) + 10 and
|
||||
y >= 5 and y < 5 + Line_height + 10 then
|
||||
new_word()
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":27,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":27,"draw_word":13,"on.keychord_press":25}
|
|
@ -1,5 +0,0 @@
|
|||
new_word = function()
|
||||
Cursor_word = edit.initialize_state(50 + #Words*Line_height*2, 20, 100, Font_height, Line_height)
|
||||
Cursor_word.contents = ''
|
||||
table.insert(Words, Cursor_word)
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
draw_word = function(word, x,y)
|
||||
App.screen.print(word.contents, x,y)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":28,"draw_teach_screen":18,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":27,"draw_word":29,"on.keychord_press":25}
|
|
@ -1,14 +0,0 @@
|
|||
draw_teach_screen = function()
|
||||
App.color{r=0.7, g=0.7, b=1, a=1}
|
||||
local cmd = 'new word (ctrl+n)'
|
||||
local cmd_text = to_text(cmd)
|
||||
local cmd_width = App.width(cmd_text)
|
||||
love.graphics.rectangle('fill', 20, 5, cmd_width+10, Line_height+10)
|
||||
App.color{r=0.2, g=0.2, b=0.2, a=1}
|
||||
App.screen.print(cmd, 20+5, 5+5)
|
||||
local y = 50
|
||||
for _,word in ipairs(Words) do
|
||||
draw_word(word)
|
||||
y = y+Line_height*2
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":29,"draw_teach_screen":30,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":27,"draw_word":29,"on.keychord_press":25}
|
|
@ -1,6 +0,0 @@
|
|||
draw_word = function(word)
|
||||
if word == Cursor_word then
|
||||
edit.draw(word, Text_color)
|
||||
else
|
||||
App.screen.print(word.contents, word.left, word.top)
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":30,"draw_teach_screen":30,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Cursor_word":24,"on.initialize":7,"on.text_input":23,"Font_height":8,"Words":12,"Line_height":9,"on.mouse_press":27,"draw_word":31,"on.keychord_press":25}
|
|
@ -1,7 +0,0 @@
|
|||
draw_word = function(word)
|
||||
if word == Cursor_word then
|
||||
edit.draw(word, Text_color)
|
||||
else
|
||||
App.screen.print(word.contents, word.left, word.top)
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":30,"on.text_input":23,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on.key_release":22,"on.initialize":7,"Cursor_word":24,"Font_height":8,"on.mouse_press":27,"Line_height":9,"draw_teach_screen":30,"draw_word":32,"on.keychord_press":25}
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":32,"on.text_input":33,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on.key_release":22,"on.initialize":7,"Cursor_word":24,"Font_height":8,"on.mouse_press":27,"Line_height":9,"draw_teach_screen":30,"draw_word":32,"on.keychord_press":25}
|
|
@ -1,5 +0,0 @@
|
|||
on.text_input = function(t)
|
||||
if Cursor_word then
|
||||
edit.text_input(Cursor_word, t)
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"new_word":28,"on":1,"on.mouse_release":20,"Mode":2,"fw_parent":33,"on.text_input":33,"fw_app":"spell-cards","draw_learn_screen":4,"on.draw":5,"Words":12,"on.key_release":22,"on.initialize":7,"Cursor_word":24,"Font_height":8,"on.mouse_press":27,"Line_height":9,"draw_teach_screen":30,"draw_word":32,"on.keychord_press":34}
|
|
@ -1,10 +0,0 @@
|
|||
on.keychord_press = function(chord, key)
|
||||
if chord == 'C-n' then
|
||||
new_word()
|
||||
elseif Cursor_word then
|
||||
if chord == 'return' then
|
||||
Cursor_word.contents = Cursor_word.lines[1].data
|
||||
Cursor_word = nil
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
{"on":1,"Line_height":9,"draw_word":32,"on.mouse_press":27,"on.mouse_release":20,"on.keychord_press":34,"draw_teach_screen":30,"fw_parent":34,"Mode":2,"fw_app":"spell-cards","on.text_input":33,"Cursor_word":24,"draw_learn_screen":4,"on.draw":5,"on.key_release":22,"Words":12,"new_word":35,"on.initialize":7,"Font_height":8}
|
|
@ -1,6 +0,0 @@
|
|||
new_word = function()
|
||||
Cursor_word = edit.initialize_state(50 + #Words*Line_height*2, 20, 100, Font_height, Line_height)
|
||||
Text.redraw_all(Cursor_word)
|
||||
Cursor_word.contents = ''
|
||||
table.insert(Words, Cursor_word)
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue