mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Highlight actively inspected callstack.
This commit is contained in:
parent
15ff98b64a
commit
be0a70a5c1
@ -4962,10 +4962,21 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
bool hilite = m_callstackInfoWindow == v->csAlloc;
|
||||||
|
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::SmallButton( "alloc" ) )
|
if( ImGui::SmallButton( "alloc" ) )
|
||||||
{
|
{
|
||||||
m_callstackInfoWindow = v->csAlloc;
|
m_callstackInfoWindow = v->csAlloc;
|
||||||
}
|
}
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PopStyleColor( 3 );
|
||||||
|
}
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
CallstackTooltip( v->csAlloc );
|
CallstackTooltip( v->csAlloc );
|
||||||
@ -4980,10 +4991,21 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
bool hilite = m_callstackInfoWindow == v->csFree;
|
||||||
|
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::SmallButton( "free" ) )
|
if( ImGui::SmallButton( "free" ) )
|
||||||
{
|
{
|
||||||
m_callstackInfoWindow = v->csFree;
|
m_callstackInfoWindow = v->csFree;
|
||||||
}
|
}
|
||||||
|
if( hilite )
|
||||||
|
{
|
||||||
|
ImGui::PopStyleColor( 3 );
|
||||||
|
}
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
CallstackTooltip( v->csFree );
|
CallstackTooltip( v->csFree );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user