ImGuiColorTextEdit icon indicating copy to clipboard operation
ImGuiColorTextEdit copied to clipboard

i cant write

Open Kianbs opened this issue 5 years ago • 3 comments

hi, i need help. i cant write in my textedit but i can paste every text and with backspace remove them. code: https://hastebin.com/voyaxatovu.cpp

Kianbs avatar Aug 29 '20 12:08 Kianbs

The hastebin links seems to be broken. If you have trouble setting up ImGuiColorTextEdit, you might want to take a look at the Demo or more specifically the main.cpp: ImGui::Begin("Text Editor Demo", nullptr, ImGuiWindowFlags_HorizontalScrollbar); editor.Render("TextEditor"); ImGui::End();

Notice how the Render-function takes a name for the editor window. Calling the parameter-less Render-function might not handle input, as it seems to not call the Handle...Input functions. (I am unsure if a parent window is required but I am guessing it is)

VerticalVeith avatar Nov 16 '20 11:11 VerticalVeith

Try calling SetHandleKeyboardInputs() and setting it to true like this:

static TextEditor editor; editor.SetHandleKeyboardInputs(true);

It fixed my issue where i couldn't type in PC or Android.

rscwn avatar Apr 28 '22 18:04 rscwn

I had the same issue with the docking branch of ImGui (I'm assuming it's related as I had similar issues in ImGuizmo), in my case changing

if (ImGui::IsWindowFocused())

to

if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows))

in TextEditor.cpp (line ~698) void TextEditor::HandleKeyboardInputs() fixed input for me.

ZaneA avatar Apr 23 '23 08:04 ZaneA