Not it's time to investigate the actual love.sound integration.
54UFWEVZ7PP2P3EQBPONJJ4Q3MKITLA2GOJY652TGQR34DNEF65QC
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":124,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":122,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":125,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_recording_button = function()
if not Recording then return end
App.color{r=0, g=0, b=0, a=0.5}
love.graphics.circle('fill', 40, 20, 10)
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":123,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":122,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":124,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_recording_button = function()
App.color{r=0, g=0, b=0, a=0.5}
love.graphics.circle('fill', 40, 20, 10)
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":122,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":122,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":123,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_recording_button = function()
App.color{r=0, g=0, b=0, a=0.5}
love.graphics.circle(40, 20, 10)
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":121,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":122,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
if not Playing then return end
App.color{r=0, g=0, b=0, a=0.5}
love.graphics.polygon('fill', {30, 10, 45, 20, 30, 30})
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":120,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":121,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
if not Playing then return end
App.color{r=0, g=0, b=0, a=0.8}
love.graphics.polygon('fill', {30, 10, 45, 20, 30, 30})
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":119,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":120,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
if not Playing then return end
App.color(Text_color)
love.graphics.polygon('fill', {30, 10, 45, 20, 30, 30})
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":118,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":119,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
if not Playing then return end
App.color(Text_color)
love.graphics.polygon('fill', {20, 10, 35, 20, 20, 30})
end
on_new_word_button = function(x,y)
return x >= 60 and x < 60+App.width(to_text('new word (ctrl+n)')) + 10 and
y >= 5 and y < 5 + Line_height + 10
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":117,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":118,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":116,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":114,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":117,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_new_word_button = 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', 60, 5, cmd_width+10, Line_height+10)
App.color(Text_color)
App.screen.print(cmd, 60+5, 5+5)
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":115,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":114,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":116,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_new_word_button = 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', 40, 5, cmd_width+10, Line_height+10)
App.color(Text_color)
App.screen.print(cmd, 40+5, 5+5)
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":114,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":114,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":115,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_new_word_button = 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', 40, 5, cmd_width+10, Line_height+10)
App.color(Text_color)
App.screen.print(cmd, 20+5, 5+5)
end
on_new_word_button = function(x,y)
return x >= 40 and x < 40+App.width(to_text('new word (ctrl+n)')) + 10 and
y >= 5 and y < 5 + Line_height + 10
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":113,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":114,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
play = function(word_idx)
Playing = true
Recording = false
end
{"draw_record_button":72,"Cursor_word":24,"play":113,"new_word":64,"to_word_idx":94,"fw_parent":112,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
record = function(word_idx)
Recording = true
Playing = false
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":111,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":112,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":110,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":111,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
if not Playing then return end
App.color(Text_color)
love.graphics.polygon('fill', {20, 5, 35, 15, 20, 25})
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":109,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":108,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":110,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_teach_screen = function()
draw_new_word_button()
draw_playing_button()
draw_recording_button()
App.color(Text_color)
for _,word in ipairs(Words) do
draw_teach_word(word)
end
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":108,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":108,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":109,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":106,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_new_word_button = 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(Text_color)
App.screen.print(cmd, 20+5, 5+5)
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":107,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"draw_playing_button":108,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":104,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":106,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_playing_button = function()
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":106,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_recording_button":107,"Words":12,"draw_new_word_button":104,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":106,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_recording_button = function()
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":105,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"draw_new_word_button":104,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":106,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_teach_screen = function()
draw_new_word_button()
draw_playing_button()
draw_recording_button()
App.color{r=0.2, g=0.2, b=0.2, a=1}
for _,word in ipairs(Words) do
draw_teach_word(word)
end
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":104,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"draw_new_word_button":104,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":105,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_teach_screen = function()
App.color{r=0.2, g=0.2, b=0.2, a=1}
for _,word in ipairs(Words) do
draw_teach_word(word)
end
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":103,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"draw_new_word_button":104,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
draw_new_word_button = 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)
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":102,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":103,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
Recording = false
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":101,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"record":100,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"Playing":102,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":101,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
Playing = false
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":100,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"on.mouse_release":52,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":100,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"Recording":101,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
Recording = nil
record = function(word_idx)
print('record', word_idx)
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":99,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":100,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
record = function(word_idx)
print('record')
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":98,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":99,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
play = function(word_idx)
print('play')
end
{"draw_record_button":72,"Cursor_word":24,"play":98,"new_word":64,"to_word_idx":94,"fw_parent":97,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
play = function(word_idx)
end
{"draw_record_button":72,"Cursor_word":24,"play":97,"new_word":64,"to_word_idx":94,"fw_parent":96,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_play = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-20-2 and x < Words[1].left-5+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":94,"fw_parent":95,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":96,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_record = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-50-2 and x < Words[1].left-30+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":94,"fw_parent":94,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":95,"learn_key_release":61,"on_play":93,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
to_word_idx = function(y)
local idx = math.floor((y-50)/Line_height/2)
if idx >= 1 and idx <= #Words then
return idx
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":94,"fw_parent":93,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":92,"learn_key_release":61,"on_play":93,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_play = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-50-2 and x < Words[1].left-30+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":92,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":92,"learn_key_release":61,"on_play":93,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_record = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-20-2 and x < Words[1].left-5+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":91,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"on_record":92,"learn_key_release":61,"on_play":91,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_play = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-30-2 and x < Words[1].left-10+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":90,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"on_play":91,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_play = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-30-2 and x < Words[1].left-10+2
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":89,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"on_play":90,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_play = function(x)
if #Words == 0 then return false end
return x >= Words[1].left-32 and x < Words[1].left-8
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":88,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"on_play":89,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if on_word(x) then
local idx = to_word_idx(y)
if idx then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
elseif on_play(x) then
play(to_word_idx(y))
elseif on_record(x) then
record(to_word_idx(y))
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":87,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
to_word_idx = function(y)
local idx math.floor((y-50)/Line_height/2)
if idx >= 1 and idx <= #Words then
return idx
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":87,"fw_parent":86,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":86,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if on_word(x) then
local idx = to_word_idx(y)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
elseif on_play(x) then
play(to_word_idx(y))
elseif on_record(x) then
record(to_word_idx(y))
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":82,"fw_parent":85,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":86,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
record = function(word_idx)
print('recording')
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":82,"fw_parent":84,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":84,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"record":85,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if on_word(x) then
local idx = to_word_idx(y)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
elseif on_play(x) then
record(to_word_idx(y))
elseif on_record(x) then
record(to_word_idx(y))
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":82,"fw_parent":83,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":84,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if on_word(x) then
local idx = to_word_idx(y)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":82,"fw_parent":82,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":83,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
to_word_idx = function(y)
return math.floor((y-50)/Line_height/2)
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"to_word_idx":82,"fw_parent":81,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":81,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if on_word(x) then
local idx = math.floor((y-50)/Line_height/2)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
end
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"fw_parent":80,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":81,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_word = function(x)
return x >= 20 + 50 and x < 150
end
{"draw_record_button":72,"Cursor_word":24,"new_word":64,"fw_parent":79,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":78,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":7,"on_word":80,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"draw_learn_screen":4,"draw_teach_screen":62,"on.mouse_press":51,"on.text_input":54,"draw_play_button":75,"on.mouse_release":52,"on.keychord_press":53,"teach_keychord_press":47,"on.key_release":55,"on":1}
on_new_word_button = function(x,y)
return x >= 20 and x < 20+App.width(to_text('new word (ctrl+n)')) + 10 and
y >= 5 and y < 5 + Line_height + 10
end
{"teach_key_release":56,"Mode":2,"teach_text_input":49,"draw_play_button":75,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":78,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":79,"teach_mouse_press":78,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
teach_mouse_press = function(x,y, mouse_button)
if on_new_word_button(x,y) then
new_word()
return
end
if x >= 20 + 50 and x < 150 then
local idx = math.floor((y-50)/Line_height/2)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
end
end
{"teach_key_release":56,"Mode":2,"teach_text_input":49,"draw_play_button":75,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":77,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":77,"teach_mouse_press":78,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
on_new_word_button = function(x,y)
return x >= 20 and x < 20+App.width(to_text('new word (ctrl+n)')) + 10
end
{"teach_key_release":56,"Mode":2,"teach_text_input":49,"draw_play_button":75,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":76,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":77,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
on_new_word_button = function(x,y)
end
{"teach_key_release":56,"Mode":2,"teach_text_input":49,"draw_play_button":75,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":75,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"on_new_word_button":76,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":75,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":74,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_play_button = function(word)
love.graphics.polygon('fill', {word.left-20, word.top,
word.left-5, word.top+10, word.left-20, word.top+20})
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":74,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":73,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_play_button = function(word)
love.graphics.polygon('fill', {word.left-18, word.top,
word.left-5, word.top+10, word.left-18, word.top+20})
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":73,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":72,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_play_button = function(word)
love.graphics.polygon('fill', {word.left-15, word.top,
word.left-5, word.top+10, word.left-15, word.top+20})
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":72,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":71,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_record_button = function(word)
love.graphics.circle('fill', word.left-40, word.top+10, 10)
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":71,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":70,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_record_button = function(word)
love.graphics.circle('fill', word.left-45, word.top+5, 10)
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":70,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":69,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_record_button = function(word)
love.graphics.circle('fill', word.left-45, word.top+5, 15)
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":69,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":68,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_record_button = function(word)
love.graphics.circle('fill', word.left-45, love.top+5, 15)
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":66,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":67,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":68,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_teach_word = function(word)
draw_record_button(word)
draw_play_button(word)
if word == Cursor_word then
edit.draw(word, Text_color)
else
App.screen.print(word.contents, word.left, word.top)
end
end
{"teach_key_release":56,"teach_text_input":49,"draw_play_button":67,"on.draw":5,"draw_record_button":66,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":66,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":41,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_play_button = function(word)
end
{"teach_key_release":56,"teach_text_input":49,"on.draw":5,"draw_record_button":66,"Words":12,"new_word":64,"on.initialize":7,"teach_mouse_release":46,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on":1,"learn_keychord_press":59,"draw_teach_screen":62,"learn_text_input":60,"fw_parent":65,"learn_key_release":61,"fw_app":"spell-cards","draw_teach_word":41,"Mode":2,"teach_mouse_press":65,"on.mouse_press":51,"teach_keychord_press":47,"on.mouse_release":52,"Cursor_word":24,"on.keychord_press":53,"on.text_input":54,"on.key_release":55,"draw_learn_screen":4}
draw_record_button = function(word)
end
teach_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()
return
end
if x >= 20 + 50 and x < 150 then
local idx = math.floor((y-50)/Line_height/2)
if idx >= 1 and idx <= #Words then
Cursor_word = Words[idx]
edit.mouse_press(Cursor_word, x,y, mouse_button)
end
end
end
{"teach_text_input":49,"learn_mouse_press":57,"on.mouse_press":51,"on.mouse_release":52,"draw_teach_word":41,"on.keychord_press":53,"teach_key_release":56,"on.key_release":55,"learn_key_release":61,"on.text_input":54,"learn_text_input":60,"draw_learn_screen":4,"learn_keychord_press":59,"on.draw":5,"learn_mouse_release":58,"Words":12,"new_word":64,"on.initialize":7,"Cursor_word":24,"Font_height":8,"teach_keychord_press":47,"Line_height":9,"teach_mouse_press":65,"fw_parent":64,"Mode":2,"draw_teach_screen":62,"fw_app":"spell-cards","on":1,"teach_mouse_release":46}
new_word = function()
Cursor_word = edit.initialize_state(
50 + (#Words+1)*Line_height*2, -- top
20 + 50, 150,
Font_height, Line_height)
Text.redraw_all(Cursor_word)
Cursor_word.contents = ''
table.insert(Words, Cursor_word)
end
{"teach_text_input":49,"learn_mouse_press":57,"on.mouse_press":51,"on.mouse_release":52,"draw_teach_word":41,"on.keychord_press":53,"teach_key_release":56,"on.key_release":55,"learn_key_release":61,"on.text_input":54,"learn_text_input":60,"draw_learn_screen":4,"learn_keychord_press":59,"on.draw":5,"learn_mouse_release":58,"Words":12,"new_word":64,"on.initialize":7,"Cursor_word":24,"Font_height":8,"teach_keychord_press":47,"Line_height":9,"teach_mouse_press":45,"fw_parent":63,"Mode":2,"draw_teach_screen":62,"fw_app":"spell-cards","on":1,"teach_mouse_release":46}
new_word = function()
Cursor_word = edit.initialize_state(
50 + (#Words+1)*Line_height*2, -- top
20, 100,
Font_height, Line_height)
Text.redraw_all(Cursor_word)
Cursor_word.contents = ''
table.insert(Words, Cursor_word)
end
{"teach_text_input":49,"learn_mouse_press":57,"on.mouse_press":51,"on.mouse_release":52,"draw_teach_word":41,"on.keychord_press":53,"teach_key_release":56,"on.key_release":55,"learn_key_release":61,"on.text_input":54,"learn_text_input":60,"draw_learn_screen":4,"learn_keychord_press":59,"on.draw":5,"learn_mouse_release":58,"Words":12,"new_word":63,"on.initialize":7,"Cursor_word":24,"Font_height":8,"teach_keychord_press":47,"Line_height":9,"teach_mouse_press":45,"fw_parent":62,"Mode":2,"draw_teach_screen":62,"fw_app":"spell-cards","on":1,"teach_mouse_release":46}
{"teach_text_input":49,"learn_mouse_press":57,"on.mouse_press":51,"on.mouse_release":52,"draw_teach_word":41,"on.keychord_press":53,"teach_key_release":56,"on.key_release":55,"learn_key_release":61,"on.text_input":54,"learn_text_input":60,"draw_learn_screen":4,"learn_keychord_press":59,"on.draw":5,"learn_mouse_release":58,"Words":12,"new_word":37,"on.initialize":7,"Cursor_word":24,"Font_height":8,"teach_keychord_press":47,"Line_height":9,"teach_mouse_press":45,"fw_parent":61,"Mode":2,"draw_teach_screen":62,"fw_app":"spell-cards","on":1,"teach_mouse_release":46}
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)
for _,word in ipairs(Words) do
draw_teach_word(word)
end
end