Make all allocation list alloc/free buttons clickable.

This commit is contained in:
Bartosz Taudul 2018-06-20 14:50:07 +02:00
parent a9fa8f966b
commit e95ca3930d

View File

@ -4986,10 +4986,12 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); 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 ) ); ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) );
} }
ImGui::PushID( idx++ );
if( ImGui::SmallButton( "alloc" ) ) if( ImGui::SmallButton( "alloc" ) )
{ {
m_callstackInfoWindow = v->csAlloc; m_callstackInfoWindow = v->csAlloc;
} }
ImGui::PopID();
if( hilite ) if( hilite )
{ {
ImGui::PopStyleColor( 3 ); ImGui::PopStyleColor( 3 );
@ -5015,10 +5017,12 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); 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 ) ); ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) );
} }
ImGui::PushID( idx++ );
if( ImGui::SmallButton( "free" ) ) if( ImGui::SmallButton( "free" ) )
{ {
m_callstackInfoWindow = v->csFree; m_callstackInfoWindow = v->csFree;
} }
ImGui::PopID();
if( hilite ) if( hilite )
{ {
ImGui::PopStyleColor( 3 ); ImGui::PopStyleColor( 3 );