mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
^F opens find zone menu and focuses on the input box.
This commit is contained in:
parent
2d143ce516
commit
ea396354d0
@ -489,6 +489,7 @@ bool View::DrawImpl()
|
|||||||
{
|
{
|
||||||
if( ImGui::IsKeyPressed( 'F' ) )
|
if( ImGui::IsKeyPressed( 'F' ) )
|
||||||
{
|
{
|
||||||
|
m_findZone.show = true;
|
||||||
m_shortcut = ShortcutAction::OpenFind;
|
m_shortcut = ShortcutAction::OpenFind;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4648,6 +4649,8 @@ uint64_t View::GetSelectionTarget( const Worker::ZoneThreadData& ev, FindZone::G
|
|||||||
|
|
||||||
void View::DrawFindZone()
|
void View::DrawFindZone()
|
||||||
{
|
{
|
||||||
|
if( m_shortcut == ShortcutAction::OpenFind ) ImGui::SetNextWindowFocus();
|
||||||
|
|
||||||
ImGui::Begin( "Find zone", &m_findZone.show );
|
ImGui::Begin( "Find zone", &m_findZone.show );
|
||||||
#ifdef TRACY_NO_STATISTICS
|
#ifdef TRACY_NO_STATISTICS
|
||||||
ImGui::TextWrapped( "Collection of statistical data is disabled in this build." );
|
ImGui::TextWrapped( "Collection of statistical data is disabled in this build." );
|
||||||
@ -4663,6 +4666,11 @@ void View::DrawFindZone()
|
|||||||
bool findClicked = false;
|
bool findClicked = false;
|
||||||
|
|
||||||
ImGui::PushItemWidth( -0.01f );
|
ImGui::PushItemWidth( -0.01f );
|
||||||
|
if( m_shortcut == ShortcutAction::OpenFind )
|
||||||
|
{
|
||||||
|
ImGui::SetKeyboardFocusHere();
|
||||||
|
m_shortcut = ShortcutAction::None;
|
||||||
|
}
|
||||||
findClicked |= ImGui::InputText( "", m_findZone.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
|
findClicked |= ImGui::InputText( "", m_findZone.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user