mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Highlight callstack button in zone info windows.
This commit is contained in:
parent
3a885bb8fd
commit
d13fc2413f
@ -2781,10 +2781,21 @@ void View::DrawZoneInfoWindow()
|
|||||||
if( ev.callstack != 0 )
|
if( ev.callstack != 0 )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
bool hilite = m_callstackInfoWindow == ev.callstack;
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.f, 0.6f, 0.6f ) );
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) );
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) );
|
||||||
|
}
|
||||||
if( ImGui::Button( "Callstack" ) )
|
if( ImGui::Button( "Callstack" ) )
|
||||||
{
|
{
|
||||||
m_callstackInfoWindow = ev.callstack;
|
m_callstackInfoWindow = ev.callstack;
|
||||||
}
|
}
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PopStyleColor( 3 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( !m_zoneInfoStack.empty() )
|
if( !m_zoneInfoStack.empty() )
|
||||||
{
|
{
|
||||||
@ -3063,10 +3074,21 @@ void View::DrawGpuInfoWindow()
|
|||||||
if( ev.callstack != 0 )
|
if( ev.callstack != 0 )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
bool hilite = m_callstackInfoWindow == ev.callstack;
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.f, 0.6f, 0.6f ) );
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) );
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) );
|
||||||
|
}
|
||||||
if( ImGui::Button( "Callstack" ) )
|
if( ImGui::Button( "Callstack" ) )
|
||||||
{
|
{
|
||||||
m_callstackInfoWindow = ev.callstack;
|
m_callstackInfoWindow = ev.callstack;
|
||||||
}
|
}
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PopStyleColor( 3 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( !m_gpuInfoStack.empty() )
|
if( !m_gpuInfoStack.empty() )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user