Closed jminor closed 1 year ago
please merge this! :+1
I you can please also update ImGuiKey_KeypadEnter
@@ -951,7 +951,7 @@ void TextEditor::HandleKeyboardInputs(bool aParentIsFocused)
SelectAll();
else if (isShortcut && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_D)))
AddCursorForNextOccurrence();
- else if (!IsReadOnly() && !alt && !ctrl && !shift && !super && (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Enter)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_KeyPadEnter))))
+ else if (!IsReadOnly() && !alt && !ctrl && !shift && !super && (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Enter)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_KeypadEnter))))
EnterCharacter('\n', false);
else if (!IsReadOnly() && !alt && !ctrl && !super && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Tab)))
EnterCharacter('\t', shift);
This fixes calls to
ImGui::IsKeyPressed()
to use ImGuiKey_XXX constants instead of character literals so that the library compiles against recent versions of Dear ImGui.