require("oct_utils") require("termbox_defs") require("ui") --textbox = oct_tb_sprite_new() textbox = {} function oct_init() -- textbox["x"] = 50 -- textbox["y"] = 20 -- textbox["shape"] = "___________" -- textbox["fg"] = TB_RED textbox1 = create_textbox("textbox1", 50, 20, 20) textbox2 = create_textbox("textbox2", 50, 22, 20) textbox3 = create_textbox("textbox3", 50, 24, 20) register_textbox(textbox1) register_textbox(textbox1) register_textbox(textbox2) register_textbox(textbox3) unregister_textbox(textbox2) unregister_textbox(textbox2) return OCT_NOT_NEEDS_NETWORKING, OCT_NEEDS_TERMBOX end function oct_loop(key, ch) textbox_contents = handle_textbox(key, ch) if (textbox_contents) then OCT_LOG_DEBUG("Received string from textbox: " .. table_to_string(textbox_contents)) end end