mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-27 00:13:29 +03:00
(Breaking) ImGuiTextFilter: removed float width parameter of Draw(const char* filter, float width). (#6206, #6395, #6447)
The reasoning is to (1) keep things consistent with DrawWithHint() without polluting the new function with width. (2) keep things consistent with other items.
This commit is contained in:
parent
f7ada78e32
commit
a14bebd948
3 changed files with 9 additions and 5 deletions
|
|
@ -45,6 +45,8 @@ Breaking Changes:
|
|||
favor of `style.CurveTessellationMaxError` (default 1.12)` which is in Pixels unit. It is
|
||||
easier to tweak + this allows us to easily scale error threshold on high density screens.
|
||||
- style.CurveTessellationMaxError == sqrf(style.CurveTessellationTol).
|
||||
- ImGuiTextFilter: removed `float width` parameter of `Draw(const char* filter, float width)`:
|
||||
prefer using `SetNextItemWidth(float)` which is standard. Kept inline redirection function.
|
||||
- Backends:
|
||||
- DirectX12: Removed support for legacy `ImGui_ImplDX12_Init()` signature, which was
|
||||
obsoleted in 1.91.6 (December 2014), because it needed to forcefully disable support
|
||||
|
|
|
|||
|
|
@ -395,6 +395,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
|||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2026/09/18 (1.93.0) - ImGuiTextFilter: removed `float width` parameter of `Draw(const char* filter, float width)`: prefer using `SetNextItemWidth(float)` which is standard. Kept inline redirection function.
|
||||
- 2026/08/03 (1.93.0) - Style: obsoleted `style.CurveTessellationTol (default 1.25)` which was in Pixels² unit in favor of `style.CurveTessellationMaxError` (default 1.12)` which is in Pixels unit.
|
||||
- style.CurveTessellationMaxError == sqrf(style.CurveTessellationTol).
|
||||
- 2026/07/20 (1.92.9) - DragXXX, SliderXXX, InputScalar: with `ImGuiItemFlags_LiveEditOnInputScalar` now defaulting to being disabled:
|
||||
|
|
@ -3101,11 +3102,9 @@ ImGuiTextFilter::ImGuiTextFilter(const char* default_filter) //-V1077
|
|||
}
|
||||
}
|
||||
|
||||
bool ImGuiTextFilter::Draw(const char* label, float width)
|
||||
bool ImGuiTextFilter::Draw(const char* label)
|
||||
{
|
||||
if (width != 0.0f)
|
||||
ImGui::SetNextItemWidth(width);
|
||||
return DrawWithHint(label);
|
||||
return DrawWithHint(label, "incl,-excl");
|
||||
}
|
||||
|
||||
// Use ImGui::SetNextItemWidth() manually if you want to use this.
|
||||
|
|
|
|||
5
imgui.h
5
imgui.h
|
|
@ -2795,8 +2795,11 @@ struct ImGuiTextFilter
|
|||
inline bool IsActive() const { return Filters.Size != 0; } // Useful if you need e.g. an alternative code-path when there are no filters
|
||||
|
||||
// Helper to call InputText() + Build() when buffer is changed.
|
||||
IMGUI_API bool Draw(const char* label = "Filter", float width = 0.0f);
|
||||
IMGUI_API bool Draw(const char* label = "Filter");
|
||||
IMGUI_API bool DrawWithHint(const char* label = "Filter", const char* hint = "incl,-excl");
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline bool Draw(const char* label, float width) { if (width != 0.0f) ImGui::SetNextItemWidth(width); return Draw(label); }
|
||||
#endif
|
||||
|
||||
// [Internal] Don't use! Will be replaced with ImStrv.
|
||||
struct ImGuiTextRange
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue