mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-27 00:13:29 +03:00
ImGuiTextFilter: Added support for space ' ' as separator. Added support for quoted "xxx" blocks. (#2435, #30)
This commit is contained in:
parent
54f86be71e
commit
c74e7e93a3
4 changed files with 49 additions and 37 deletions
4
imgui.h
4
imgui.h
|
|
@ -2785,7 +2785,7 @@ struct ImGuiOnceUponAFrame
|
|||
operator bool() const { int current_frame = ImGui::GetFrameCount(); if (RefFrame == current_frame) return false; RefFrame = current_frame; return true; }
|
||||
};
|
||||
|
||||
// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
|
||||
// Helper: Parse and apply text filters e.g. 'aaa bbb -ccc'.
|
||||
struct ImGuiTextFilter
|
||||
{
|
||||
IMGUI_API ImGuiTextFilter(const char* default_filter = "");
|
||||
|
|
@ -2796,7 +2796,7 @@ struct ImGuiTextFilter
|
|||
|
||||
// Helper to call InputText() + Build() when buffer is changed.
|
||||
IMGUI_API bool Draw(const char* label = "Filter");
|
||||
IMGUI_API bool DrawWithHint(const char* label = "Filter", const char* hint = "incl,-excl");
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue