spell-cards.love/0017-teach_mouse_press

17 lines
363 B
Plaintext

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