mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +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
|
||||
{
|
||||
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" ) )
|
||||
{
|
||||
m_callstackInfoWindow = v->csAlloc;
|
||||
}
|
||||
if( hilite )
|
||||
{
|
||||
ImGui::PopStyleColor( 3 );
|
||||
}
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
CallstackTooltip( v->csAlloc );
|
||||
@ -4980,10 +4991,21 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
||||
}
|
||||
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" ) )
|
||||
{
|
||||
m_callstackInfoWindow = v->csFree;
|
||||
}
|
||||
if( hilite )
|
||||
{
|
||||
ImGui::PopStyleColor( 3 );
|
||||
}
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
CallstackTooltip( v->csFree );
|
||||
|
Loading…
Reference in New Issue
Block a user