I still need to provide some visual indicator of correct and incorrect answers.
IBLDYAK2M5FN5XZNOWIQDN3BTUQGCPPP7R72D2YGKJITX64PJQKQC
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1].data) == trim(Words[Answer_idx].contents) then
print('correct!')
Workbook.lines[1].data = ''
Workbook.cursor1 = {line=1, pos=1}
Text.redraw_all(Workbook)
Answer_idx = love.math.random(#Words)
play(Answer_idx)
else
print(':(')
end
else
edit.keychord_press(Workbook, chord, key)
end
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":230,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":231,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1].data) == trim(Words[Answer_idx].contents) then
print('correct!')
Workbook.lines[1].data = ''
Text.redraw_all(Workbook)
Answer_idx = love.math.random(#Words)
play(Answer_idx)
else
print(':(')
end
else
edit.keychord_press(Workbook, chord, key)
end
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":229,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":230,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1].data) == trim(Words[Answer_idx].contents) then
print('correct!')
else
print(':(')
end
else
edit.keychord_press(Workbook, chord, key)
end
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":228,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":229,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1].data) == trim(Words[answer_idx].contents) then
print('correct!')
else
print(':(')
end
else
edit.keychord_press(Workbook, chord, key)
end
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":227,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":228,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1]) == trim(Words[answer_idx].contents) then
print('correct!')
else
print(':(')
end
else
edit.keychord_press(Workbook, chord, key)
end
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":226,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":227,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
learn_keychord_press = function(chord, key)
if chord == 'return' then
if trim(Workbook.lines[1]) == trim(Words[answer_idx].contents) then
print('correct!')
else
print(':(')
end
end
edit.keychord_press(Workbook, chord, key)
end
{"on.save_settings":200,"Words":12,"on.initialize":202,"on_word":80,"Font_height":8,"to_word_idx":94,"Recording_word":138,"record":189,"draw_teach_word":68,"learn_initialize":224,"on.mouse_press":51,"on_record":95,"on.mouse_release":52,"teach_mouse_release":46,"fw_parent":225,"teach_keychord_press":47,"fw_app":"spell-cards","teach_key_release":56,"teach_text_input":49,"play":197,"Workbook":198,"teach_mouse_press":88,"exists":175,"draw_new_word_button":117,"file_exists":176,"learn_mouse_press":219,"on_new_word_button":118,"draw_recording_button":133,"on.load_settings":201,"draw_playing_button":130,"Recording_device":132,"learn_text_input":222,"save_wav":171,"learn_key_release":223,"Answer_idx":206,"learn_keychord_press":226,"new_word":225,"on":1,"Line_height":9,"draw_record_button":140,"Cursor_word":24,"draw_play_button":141,"on.keychord_press":194,"on_play":96,"on.key_release":55,"Mode":199,"on.text_input":54,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"learn_mouse_release":220,"on.draw":5}
new_word = function()
Cursor_word = edit.initialize_state(
50 + (#Words+1)*Line_height*2, -- top
20 + 50, App.screen.width - 50,
Font_height, Line_height)
Text.redraw_all(Cursor_word)
Cursor_word.contents = ''
table.insert(Words, Cursor_word)
end
{"on.text_input":54,"Cursor_word":24,"learn_initialize":224,"on_new_word_button":118,"on_record":95,"fw_parent":224,"on_word":80,"fw_app":"spell-cards","exists":175,"on_play":96,"draw_teach_word":68,"draw_new_word_button":117,"Recording_word":138,"draw_playing_button":130,"teach_text_input":49,"teach_mouse_press":88,"learn_mouse_release":220,"teach_mouse_release":46,"on.key_release":55,"Mode":199,"teach_keychord_press":47,"teach_key_release":56,"record":189,"draw_learn_screen":210,"Playing_source":126,"on.draw":5,"to_word_idx":94,"Words":12,"draw_recording_button":133,"on.initialize":202,"draw_teach_screen":110,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"on":1,"new_word":225,"learn_keychord_press":221,"Answer_idx":206,"learn_text_input":222,"on.mouse_release":52,"on.save_settings":200,"learn_key_release":223,"save_wav":171,"Recording_device":132,"on.load_settings":201,"on.mouse_press":51,"draw_record_button":140,"file_exists":176,"draw_play_button":141,"on.keychord_press":194,"Workbook":198,"play":197}
learn_initialize = function()
Workbook = edit.initialize_state(
50, -- top
20 + 50, App.screen.width-50,
Font_height, Line_height)
Text.redraw_all(Workbook)
Answer_idx = love.math.random(#Words)
play(Answer_idx)
end
{"Workbook":198,"learn_key_release":223,"learn_initialize":224,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":223,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":221,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":220,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":222}
learn_key_release = function(key, scancode)
edit.key_release(Workbook, key, scancode)
end
{"Workbook":198,"learn_key_release":223,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":222,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":221,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":220,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":222}
learn_text_input = function(t)
edit.text_input(Workbook, t)
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":221,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":221,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":220,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":222}
learn_keychord_press = function(chord, key)
edit.keychord_press(Workbook, chord, key)
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":220,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":221,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":220,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_release = function(x,y, mouse_button)
edit.mouse_release(Workbook, x,y, mouse_button)
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":219,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":220,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
if y < 50 then
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":218,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":219,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press', Words[1].left)
if y < 50 then
print('play')
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":217,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":218,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press', Words[1].left)
if on_play(x) then
print('play')
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":216,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":217,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press')
print('play', #Words)
if on_play(x) then
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":215,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":216,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press')
if on_play(x) then
print('play', #Words)
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":214,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":215,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press')
if on_play(x) then
print('play')
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":213,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":214,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
print('learn mouse press')
if on_play(x) then
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"Workbook":198,"learn_key_release":61,"learn_initialize":207,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"Answer_idx":206,"fw_parent":212,"on.key_release":55,"fw_app":"spell-cards","on.text_input":54,"Cursor_word":24,"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"save_wav":171,"on.save_settings":200,"Mode":199,"record":189,"on":1,"file_exists":176,"learn_keychord_press":59,"draw_teach_word":68,"on_play":96,"play":197,"teach_key_release":56,"on.load_settings":201,"teach_mouse_press":88,"on.keychord_press":194,"teach_mouse_release":46,"on_record":95,"teach_keychord_press":47,"on.mouse_press":51,"draw_teach_screen":110,"Playing_source":126,"draw_learn_screen":210,"draw_recording_button":133,"on.draw":5,"exists":175,"Words":12,"to_word_idx":94,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":213,"Line_height":9,"learn_mouse_release":58,"teach_text_input":49,"draw_playing_button":130,"Recording_word":138,"learn_text_input":60}
learn_mouse_press = function(x,y, mouse_button)
if on_play(x) then
play(Answer_idx)
else
edit.mouse_press(Workbook, x,y, mouse_button)
end
end
{"exists":175,"on_play":96,"on_record":95,"Workbook":198,"on":1,"draw_teach_word":68,"learn_initialize":207,"teach_text_input":49,"Answer_idx":206,"teach_mouse_release":46,"teach_keychord_press":47,"record":189,"learn_mouse_press":212,"learn_mouse_release":58,"draw_learn_screen":210,"Recording_device":132,"fw_parent":211,"Cursor_word":24,"learn_text_input":60,"to_word_idx":94,"on.initialize":202,"on.load_settings":201,"Font_height":8,"draw_teach_screen":110,"Line_height":9,"Words":12,"draw_record_button":140,"Mode":199,"draw_play_button":141,"learn_key_release":61,"teach_mouse_press":88,"save_wav":171,"on_new_word_button":118,"teach_key_release":56,"draw_recording_button":133,"Playing_source":126,"on.mouse_press":51,"draw_playing_button":130,"on.mouse_release":52,"fw_app":"spell-cards","on.keychord_press":194,"draw_new_word_button":117,"on.key_release":55,"on_word":80,"on.text_input":54,"on.draw":5,"play":197,"learn_keychord_press":59,"file_exists":176,"Recording_word":138,"on.save_settings":200,"new_word":64}
learn_mouse_press = function(x,y, mouse_button)
if on_play(x) then
play(Answer_idx)
end
end
{"exists":175,"on_play":96,"on_record":95,"Workbook":198,"on":1,"draw_teach_word":68,"learn_initialize":207,"teach_text_input":49,"Answer_idx":206,"teach_mouse_release":46,"teach_keychord_press":47,"record":189,"learn_mouse_press":211,"learn_mouse_release":58,"draw_learn_screen":210,"Recording_device":132,"fw_parent":210,"Cursor_word":24,"learn_text_input":60,"to_word_idx":94,"on.initialize":202,"on.load_settings":201,"Font_height":8,"draw_teach_screen":110,"Line_height":9,"Words":12,"draw_record_button":140,"Mode":199,"draw_play_button":141,"learn_key_release":61,"teach_mouse_press":88,"save_wav":171,"on_new_word_button":118,"teach_key_release":56,"draw_recording_button":133,"Playing_source":126,"on.mouse_press":51,"draw_playing_button":130,"on.mouse_release":52,"fw_app":"spell-cards","on.keychord_press":194,"draw_new_word_button":117,"on.key_release":55,"on_word":80,"on.text_input":54,"on.draw":5,"play":197,"learn_keychord_press":59,"file_exists":176,"Recording_word":138,"on.save_settings":200,"new_word":64}
{"draw_teach_word":68,"on_play":96,"learn_initialize":207,"on_record":95,"teach_mouse_release":46,"teach_keychord_press":47,"fw_app":"spell-cards","teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"draw_recording_button":133,"learn_keychord_press":59,"learn_text_input":60,"teach_mouse_press":88,"learn_key_release":61,"fw_parent":209,"Playing_source":126,"exists":175,"Answer_idx":206,"file_exists":176,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"draw_learn_screen":210,"on.key_release":55,"play":197,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"Recording_word":138,"teach_key_release":56,"on_new_word_button":118,"save_wav":171,"new_word":64,"on.save_settings":200,"Mode":199,"on_word":80,"draw_teach_screen":110,"on.load_settings":201,"to_word_idx":94,"on.mouse_press":51,"Recording_device":132,"learn_mouse_release":58,"record":189,"Workbook":198,"on":1}
draw_learn_screen = function()
edit.draw(Workbook, Text_color)
if Playing_source and not Playing_source:isPlaying() then
Playing_source = nil
end
if not Playing_source then
App.color{r=0, g=0, b=0, a=0.5}
love.graphics.polygon('fill', {30, 10, 45, 20, 30, 30})
end
end
{"draw_teach_word":68,"on_play":96,"learn_initialize":207,"on_record":95,"teach_mouse_release":46,"teach_keychord_press":47,"fw_app":"spell-cards","teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"draw_recording_button":133,"learn_keychord_press":59,"learn_text_input":60,"teach_mouse_press":88,"learn_key_release":61,"fw_parent":208,"Playing_source":126,"exists":175,"Answer_idx":206,"file_exists":176,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"draw_learn_screen":209,"on.key_release":55,"play":197,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"Recording_word":138,"teach_key_release":56,"on_new_word_button":118,"save_wav":171,"new_word":64,"on.save_settings":200,"Mode":199,"on_word":80,"draw_teach_screen":110,"on.load_settings":201,"to_word_idx":94,"on.mouse_press":51,"Recording_device":132,"learn_mouse_release":58,"record":189,"Workbook":198,"on":1}
draw_learn_screen = function()
edit.draw(Workbook, Text_color)
if Playing_source and not Playing_source:isPlaying() then
Playing_source = nil
end
if Playing_source then return end
end
{"draw_teach_word":68,"on_play":96,"learn_initialize":207,"on_record":95,"teach_mouse_release":46,"teach_keychord_press":47,"fw_app":"spell-cards","teach_text_input":49,"on.draw":5,"Words":12,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"draw_recording_button":133,"learn_keychord_press":59,"learn_text_input":60,"teach_mouse_press":88,"learn_key_release":61,"fw_parent":207,"Playing_source":126,"exists":175,"Answer_idx":206,"file_exists":176,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"draw_learn_screen":208,"on.key_release":55,"play":197,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"Recording_word":138,"teach_key_release":56,"on_new_word_button":118,"save_wav":171,"new_word":64,"on.save_settings":200,"Mode":199,"on_word":80,"draw_teach_screen":110,"on.load_settings":201,"to_word_idx":94,"on.mouse_press":51,"Recording_device":132,"learn_mouse_release":58,"record":189,"Workbook":198,"on":1}
draw_learn_screen = function()
edit.draw(Workbook, Text_color)
if Playing_source and not Playing_source:isPlaying() then
Playing_source = nil
end
end
learn_initialize = function()
Workbook = edit.initialize_state(
50, -- top
20 + 50, 150,
Font_height, Line_height)
Text.redraw_all(Workbook)
Answer_idx = love.math.random(#Words)
play(Answer_idx)
end
{"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Playing_source":126,"on.save_settings":200,"draw_record_button":140,"on.mouse_release":52,"Recording_device":132,"on.load_settings":201,"fw_app":"spell-cards","on.key_release":55,"on.text_input":54,"on":1,"on_new_word_button":118,"new_word":64,"learn_initialize":207,"on_word":80,"teach_keychord_press":47,"draw_recording_button":133,"to_word_idx":94,"play":197,"Cursor_word":24,"file_exists":176,"record":189,"Workbook":198,"Recording_word":138,"on.keychord_press":194,"draw_teach_word":68,"on_play":96,"draw_play_button":141,"on.mouse_press":51,"draw_teach_screen":110,"on_record":95,"draw_new_word_button":117,"teach_mouse_release":46,"teach_text_input":49,"Mode":199,"save_wav":171,"teach_key_release":56,"draw_playing_button":130,"draw_learn_screen":205,"Answer_idx":206,"on.draw":5,"exists":175,"Words":12,"fw_parent":206,"on.initialize":202,"teach_mouse_press":88,"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,"Playing_source":126,"on.save_settings":200,"draw_record_button":140,"on.mouse_release":52,"Recording_device":132,"on.load_settings":201,"fw_app":"spell-cards","on.key_release":55,"on.text_input":54,"on":1,"on_new_word_button":118,"new_word":64,"learn_initialize":204,"on_word":80,"teach_keychord_press":47,"draw_recording_button":133,"to_word_idx":94,"play":197,"Cursor_word":24,"file_exists":176,"record":189,"Workbook":198,"Recording_word":138,"on.keychord_press":194,"draw_teach_word":68,"on_play":96,"draw_play_button":141,"on.mouse_press":51,"draw_teach_screen":110,"on_record":95,"draw_new_word_button":117,"teach_mouse_release":46,"teach_text_input":49,"Mode":199,"save_wav":171,"teach_key_release":56,"draw_playing_button":130,"draw_learn_screen":205,"Answer_idx":206,"on.draw":5,"exists":175,"Words":12,"fw_parent":205,"on.initialize":202,"teach_mouse_press":88,"Font_height":8}
Answer_idx = nil
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":201,"draw_teach_word":68,"on_play":96,"learn_initialize":204,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":205,"exists":175,"fw_parent":204,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
draw_learn_screen = function()
edit.draw(Workbook, Text_color)
end
learn_initialize = function()
Workbook = edit.initialize_state(
50, -- top
20 + 50, 150,
Font_height, Line_height)
Text.redraw_all(Workbook)
end
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":201,"draw_teach_word":68,"on_play":96,"learn_initialize":204,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":203,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
learn_initialize = function()
Work_book = edit.initialize_state(
50, -- top
20 + 50, 150,
Font_height, Line_height)
end
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":201,"draw_teach_word":68,"on_play":96,"learn_initialize":203,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":202,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
on.initialize = function(arg)
Font_height = 20
love.graphics.setFont(love.graphics.newFont(Font_height))
Line_height = math.floor(Font_height * 1.3)
learn_initialize()
end
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":201,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":201,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":202,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
on.load_settings = function(settings)
Font_height = settings.font_height
Line_height = settings.line_height
for _,w in ipairs(settings.words) do
new_word()
Cursor_word.contents = w
Cursor_word.lines[1].data = w
Text.redraw_all(Cursor_word)
end
Cursor_word = nil
end
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":201,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":200,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":7,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
on.save_settings = function()
settings = {words={}}
for _,word in ipairs(Words) do
if word.contents and #word.contents > 0 then
table.insert(settings.words, word.contents)
end
end
settings.font_height = Font_height
settings.line_height = Line_height
return settings
end
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":200,"file_exists":176,"record":189,"on.load_settings":193,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":199,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":7,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":192,"file_exists":176,"record":189,"on.load_settings":193,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":199,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":198,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":7,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
Mode = 'learn'
{"on_new_word_button":118,"new_word":64,"Recording_device":132,"on_word":80,"to_word_idx":94,"on.save_settings":192,"file_exists":176,"record":189,"on.load_settings":193,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"Mode":2,"teach_key_release":56,"draw_learn_screen":4,"exists":175,"fw_parent":197,"Words":12,"fw_app":"spell-cards","Playing_source":126,"on.initialize":7,"draw_new_word_button":117,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"on_record":95,"learn_keychord_press":59,"on":1,"learn_text_input":60,"teach_keychord_press":47,"learn_key_release":61,"on.draw":5,"teach_text_input":49,"save_wav":171,"draw_teach_screen":110,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":194,"Recording_word":138,"on.key_release":55,"Workbook":198,"on.text_input":54,"draw_playing_button":130,"Cursor_word":24,"play":197,"draw_recording_button":133}
Workbook = nil