mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-17 19:09:27 +01:00
InputText: Filtering private Unicode range 0xE000-0xF8FF seems like glfw on OSX uses those?
This commit is contained in:
parent
1120f5d720
commit
6777145853
@ -5024,6 +5024,9 @@ static bool InputTextFilterCharacter(ImWchar c, ImGuiInputTextFlags flags)
|
|||||||
if (c < 128 && c != ' ' && !isprint((int)(c & 0xFF)))
|
if (c < 128 && c != ' ' && !isprint((int)(c & 0xFF)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (c >= 0xE000 && c <= 0xF8FF) // Filter private Unicode range. I don't imagine anybody would want to input them. GLFW on OSX seems to send private characters for special keys like arrow keys.
|
||||||
|
return true;
|
||||||
|
|
||||||
if (flags & ImGuiInputTextFlags_CharsDecimal)
|
if (flags & ImGuiInputTextFlags_CharsDecimal)
|
||||||
if (!(c >= '0' && c <= '9') && (c != '.') && (c != '-') && (c != '+') && (c != '*') && (c != '/'))
|
if (!(c >= '0' && c <= '9') && (c != '.') && (c != '-') && (c != '+') && (c != '*') && (c != '/'))
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user