Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant write #124

Open
Kianbs opened this issue Aug 29, 2020 · 3 comments
Open

i cant write #124

Kianbs opened this issue Aug 29, 2020 · 3 comments

Comments

@Kianbs
Copy link

Kianbs commented Aug 29, 2020

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

@VeithBuergerhoff
Copy link

VeithBuergerhoff commented Nov 16, 2020

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)

@rscwn
Copy link

rscwn commented Apr 28, 2022

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.

@ZaneA
Copy link

ZaneA commented Apr 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants