mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-27 01:56:35 +00:00
InputText: Tweak to make the if statement more readable + update Changelog (#1747)
This commit is contained in:
parent
1554d97492
commit
f93dce9513
@ -51,6 +51,7 @@ Other Changes:
|
||||
- Window: Fixed default proportional item width lagging by one frame on resize.
|
||||
- Window: Fixed popups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
|
||||
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
|
||||
- InputText: On a Mac, filter out characters when the Cmd modifier is held. (#1747) [@sivu]
|
||||
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
|
||||
- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unecessary conversion (Allegro 5 doesn't support 16-bit indices).
|
||||
- Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
|
||||
|
@ -10093,7 +10093,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
{
|
||||
// Process text input (before we check for Return because using some IME will effectively send a Return?)
|
||||
// We ignore CTRL inputs, but need to allow ALT+CTRL as some keyboards (e.g. German) use AltGR (which _is_ Alt+Ctrl) to input certain characters.
|
||||
if (!((io.KeyCtrl && !io.KeyAlt) || (io.OptMacOSXBehaviors && io.KeySuper)) && is_editable && !user_nav_input_start)
|
||||
bool ignore_inputs = (io.KeyCtrl && !io.KeyAlt) || (io.OptMacOSXBehaviors && io.KeySuper);
|
||||
if (!ignore_inputs && is_editable && !user_nav_input_start)
|
||||
for (int n = 0; n < IM_ARRAYSIZE(io.InputCharacters) && io.InputCharacters[n]; n++)
|
||||
{
|
||||
// Insert character if they pass filtering
|
||||
|
Loading…
Reference in New Issue
Block a user