0 Members and 1 Guest are viewing this topic.
function on.create() editor = D2Editor.newRichText() editor:move(0,150) editor:resize(250,50)endfunction on.charIn(char) editor:setText(editor:getText() .. char)end function on.enterKey() local chunk, errc = loadstring(editor:getText()) if (not chunk) then print(errc) else local status, err = pcall(chunk) if (not status) then print(err) end end editor:setText("")endfunction on.backspaceKey() editor:setText(editor:getText():sub(1, editor:getText():len() - 1))end
I am a proud cynic.