Open Kianbs opened 4 years ago
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)
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.
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.
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