Skip to content

Commit 604f2fa

Browse files
committed
InputScalar: added an assert to clarify that ImGuiInputTextFlags_EnterReturnsTrue is not supported by InputFloat, InputInt etc. (#8065)
It was never correctly supported. Please open an issue if you this would be useful to you. Otherwise use IsItemDeactivatedAfterEdit().
1 parent 38617a5 commit 604f2fa

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ Other changes:
9393
preventing use of external shortcuts not guarded by an ActiveId check. (#8048) [@geertbleyen]
9494
- InputText: ensure mouse cursor shape is set regardless of whether keyboard mode is
9595
enabled or not. (#6417)
96+
- InputScalar: added an assert to clarify that ImGuiInputTextFlags_EnterReturnsTrue is not
97+
supported by InputFloat, InputInt, InputScalar etc. widgets. It actually never was. (#8065)
9698
- imgui_freetype: Added support for plutosvg (as an alternative to lunasvg) to render
9799
OpenType SVG fonts. Requires defining IMGUI_ENABLE_FREETYPE_PLUTOSVG along with IMGUI_ENABLE_FREETYPE.
98100
Providing headers/librairies for plutosvg + plutovg is up to you (see #7927 for help).

imgui_widgets.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -3656,6 +3656,7 @@ bool ImGui::InputScalar(const char* label, ImGuiDataType data_type, void* p_data
36563656

36573657
ImGuiContext& g = *GImGui;
36583658
ImGuiStyle& style = g.Style;
3659+
IM_ASSERT((flags & ImGuiInputTextFlags_EnterReturnsTrue) == 0); // Not supported by InputScalar(). Please open an issue if you this would be useful to you. Otherwise use IsItemDeactivatedAfterEdit()!
36593660

36603661
if (format == NULL)
36613662
format = DataTypeGetInfo(data_type)->PrintFmt;

0 commit comments

Comments
 (0)