Set labels for input text fields.

This commit is contained in:
Bartosz Taudul 2019-03-15 01:47:07 +01:00
parent 6a36bb2fc2
commit b43d962194
2 changed files with 3 additions and 3 deletions

View File

@ -289,7 +289,7 @@ int main( int argc, char** argv )
ImGui::Separator(); ImGui::Separator();
ImGui::TextUnformatted( "Connect to client" ); ImGui::TextUnformatted( "Connect to client" );
bool connectClicked = false; bool connectClicked = false;
connectClicked |= ImGui::InputTextWithHint( "", "Enter address", addr, 1024, ImGuiInputTextFlags_EnterReturnsTrue ); connectClicked |= ImGui::InputTextWithHint( "###connectaddress", "Enter address", addr, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
if( !connHistVec.empty() ) if( !connHistVec.empty() )
{ {
ImGui::SameLine(); ImGui::SameLine();

View File

@ -5668,7 +5668,7 @@ void View::DrawFindZone()
ImGui::SetKeyboardFocusHere(); ImGui::SetKeyboardFocusHere();
m_shortcut = ShortcutAction::None; m_shortcut = ShortcutAction::None;
} }
findClicked |= ImGui::InputTextWithHint( "", "Enter zone name to search for", m_findZone.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue ); findClicked |= ImGui::InputTextWithHint( "###findzone", "Enter zone name to search for", m_findZone.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
ImGui::PopItemWidth(); ImGui::PopItemWidth();
#ifdef TRACY_EXTENDED_FONT #ifdef TRACY_EXTENDED_FONT
@ -6885,7 +6885,7 @@ void View::DrawCompare()
bool findClicked = false; bool findClicked = false;
ImGui::PushItemWidth( -0.01f ); ImGui::PushItemWidth( -0.01f );
findClicked |= ImGui::InputTextWithHint( "", "Enter zone name to search for", m_compare.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue ); findClicked |= ImGui::InputTextWithHint( "###compare", "Enter zone name to search for", m_compare.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
ImGui::PopItemWidth(); ImGui::PopItemWidth();
#ifdef TRACY_EXTENDED_FONT #ifdef TRACY_EXTENDED_FONT