mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add thread colors to options menu.
This commit is contained in:
parent
4ea62ecb06
commit
2cec6f5482
@ -6761,6 +6761,9 @@ void View::DrawOptions()
|
|||||||
m_threadDnd.push_back( ImGui::GetCursorScreenPos().y );
|
m_threadDnd.push_back( ImGui::GetCursorScreenPos().y );
|
||||||
ImGui::PushID( idx );
|
ImGui::PushID( idx );
|
||||||
const auto threadName = m_worker.GetThreadName( t->id );
|
const auto threadName = m_worker.GetThreadName( t->id );
|
||||||
|
const auto threadColor = GetThreadColor( t->id, 0 );
|
||||||
|
SmallColorBox( threadColor );
|
||||||
|
ImGui::SameLine();
|
||||||
SmallCheckbox( threadName, &Vis( t ).visible );
|
SmallCheckbox( threadName, &Vis( t ).visible );
|
||||||
if( ImGui::BeginDragDropSource( ImGuiDragDropFlags_SourceNoHoldToOpenOthers ) )
|
if( ImGui::BeginDragDropSource( ImGuiDragDropFlags_SourceNoHoldToOpenOthers ) )
|
||||||
{
|
{
|
||||||
@ -6769,6 +6772,8 @@ void View::DrawOptions()
|
|||||||
ImGui::TextUnformatted( ICON_FA_RANDOM );
|
ImGui::TextUnformatted( ICON_FA_RANDOM );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
#endif
|
#endif
|
||||||
|
SmallColorBox( threadColor );
|
||||||
|
ImGui::SameLine();
|
||||||
ImGui::TextUnformatted( threadName );
|
ImGui::TextUnformatted( threadName );
|
||||||
ImGui::EndDragDropSource();
|
ImGui::EndDragDropSource();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user