Comments, minor tweaks to ImGuiTextFilter.
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 9fbd8b4..1c4bd71 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -50,10 +50,11 @@
You should never need those functions! You can do everything in less a confusing manner by only
using GetCursorScreenPos() and GetContentRegionAvail(). Also always consider that if you are using
GetWindowPos() and GetCursorPos() you may also be making things unnecessarily complicated.
- I repeat: You can do everything with GetCursorScreenPos() and GetContentRegionAvail()!!
- - GetWindowContentRegionMax().x - GetCursorPos().x --> GetContentRegionAvail().x
- - GetWindowContentRegionMax().x + GetWindowPos().x --> GetCursorScreenPos().x + GetContentRegionAvail().x
- - GetContentRegionMax() --> GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in weird local coordinates
+ I repeat: You can do everything with GetCursorScreenPos() and GetContentRegionAvail()!
+ - GetWindowContentRegionMax().x - GetCursorPos().x --> GetContentRegionAvail().x
+ - GetWindowContentRegionMax().x + GetWindowPos().x --> GetCursorScreenPos().x + GetContentRegionAvail().x // when called from left edge of window
+ - GetContentRegionMax() --> GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in local coordinates
+ - GetWindowContentRegionMax().x - GetWindowContentRegionMin().x --> GetContentRegionAvail() // when called from left edge of window
- Item flag changes:
- Obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag()/PopItemFlag()
with ImGuiItemFlags_ButtonRepeat. Kept inline redirecting functions (will obsolete).
diff --git a/imgui.cpp b/imgui.cpp
index 6b545d6..6bd0c05 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -435,9 +435,11 @@
- instead of: GetWindowContentRegionMax().x - GetCursorPos().x
- you can use: GetContentRegionAvail().x
- instead of: GetWindowContentRegionMax().x + GetWindowPos().x
- - you can use: GetCursorScreenPos().x + GetContentRegionAvail().x (from left edge of window)
+ - you can use: GetCursorScreenPos().x + GetContentRegionAvail().x // when called from left edge of window
- instead of: GetContentRegionMax()
- - you cna use: GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in weird local coordinates
+ - you can use: GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in local coordinates
+ - instead of: GetWindowContentRegionMax().x - GetWindowContentRegionMin().x
+ - you can use: GetContentRegionAvail() // when called from left edge of window
- 2024/07/15 (1.91.0) - renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups. (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
(internals: also renamed ImGuiItemFlags_SelectableDontClosePopup into ImGuiItemFlags_AutoClosePopups with inverted behaviors)
- 2024/07/15 (1.91.0) - obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag(ImGuiItemFlags_ButtonRepeat, ...)/PopItemFlag().
@@ -2753,11 +2755,11 @@
return true;
if (text == NULL)
- text = "";
+ text = text_end = "";
for (const ImGuiTextRange& f : Filters)
{
- if (f.empty())
+ if (f.b == f.e)
continue;
if (f.b[0] == '-')
{