Hello. I’m a beginner of Defold.
I think Input Method is buggy on iOS and Android.
On Android tablet, characters are printed twice with one touch.
On iPhone, I can not touch all the hiragana., then I can not convert Hiragana to Kanji.
I’m using ttf font which can output Japanese.
I’m sorry for my poor English.
function init(self)
msg.post(".", "acquire_input_focus")
end
function on_input(self, action_id, action)
local txt = gui.get_text(gui.get_node("textNode"))
if action_id == hash("markedTextAction") then
gui.set_text(gui.get_node("textNode"), txt .. action.text)
-- gui.set_text(gui.get_node("textNode"), action.text)
pprint(action)
elseif action_id == hash("textAction") then
gui.set_text(gui.get_node("textNode"), txt .. action.text)
pprint(action)
elseif action_id == hash("touchAction") then
gui.show_keyboard(gui.KEYBOARD_TYPE_DEFAULT, true)
end
end
Android
iPhone