ImGuiTextFilter: default parameter width=0.0f for no override, allow override with negative values

This commit is contained in:
ocornut
2015-08-13 21:51:34 -06:00
parent 307ed78006
commit 07de0448f9
3 changed files with 4 additions and 4 deletions

View File

@ -1283,10 +1283,10 @@ ImGuiTextFilter::ImGuiTextFilter(const char* default_filter)
void ImGuiTextFilter::Draw(const char* label, float width)
{
if (width > 0.0f)
if (width != 0.0f)
ImGui::PushItemWidth(width);
ImGui::InputText(label, InputBuf, IM_ARRAYSIZE(InputBuf));
if (width > 0.0f)
if (width != 0.0f)
ImGui::PopItemWidth();
Build();
}