InputTextMultiline() filtering out \r for now (#200)

docking
ocornut 10 years ago
parent 73db855c77
commit 1b28f11acb

@ -6720,7 +6720,7 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags f
if (c < 128 && c != ' ' && !isprint((int)(c & 0xFF))) if (c < 128 && c != ' ' && !isprint((int)(c & 0xFF)))
{ {
bool pass = false; bool pass = false;
pass |= ((c == '\n' || c == '\r') && (flags & ImGuiInputTextFlags_Multiline)); pass |= (c == '\n' && (flags & ImGuiInputTextFlags_Multiline));
pass |= (c == '\t' && (flags & ImGuiInputTextFlags_AllowTabInput)); pass |= (c == '\t' && (flags & ImGuiInputTextFlags_AllowTabInput));
if (!pass) if (!pass)
return false; return false;

Loading…
Cancel
Save