mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Indicate inspected memory address on alloc list.
This commit is contained in:
parent
cf3bf4378b
commit
84d0f1a3ea
@ -5316,10 +5316,21 @@ void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const
|
||||
while( ptr != end )
|
||||
{
|
||||
auto v = *ptr;
|
||||
const auto arrIdx = std::distance( mem.data.begin(), v );
|
||||
|
||||
if( m_memoryAllocInfoWindow == arrIdx )
|
||||
{
|
||||
ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 1.f, 0.f, 0.f, 1.f ) );
|
||||
DrawAddress( ptr );
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawAddress( ptr );
|
||||
if( ImGui::IsItemClicked() )
|
||||
{
|
||||
m_memoryAllocInfoWindow = std::distance( mem.data.begin(), v );
|
||||
m_memoryAllocInfoWindow = arrIdx;
|
||||
}
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text( "%s", RealToString( v->size, true ) );
|
||||
|
Loading…
Reference in New Issue
Block a user