mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Move extra tools to main window button bar popup.
This commit is contained in:
parent
fc7f77eb7a
commit
c6207ed0e9
@ -557,6 +557,34 @@ bool View::DrawImpl()
|
||||
ToggleButton( "Info", m_showInfo );
|
||||
#endif
|
||||
ImGui::SameLine();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::Button( ICON_FA_TOOLS ) ) ImGui::OpenPopup( "ToolsPopup" );
|
||||
#else
|
||||
if( ImGui::Button( "Tools" ) ) ImGui::OpenPopup( "ToolsPopup" );
|
||||
#endif
|
||||
if( ImGui::BeginPopup( "ToolsPopup" ) )
|
||||
{
|
||||
const auto ficnt = m_worker.GetFrameImageCount();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ButtonDisablable( ICON_FA_PLAY " Playback", ficnt == 0 ) )
|
||||
#else
|
||||
if( ButtonDisablable( "Playback", , ficnt == 0) )
|
||||
#endif
|
||||
{
|
||||
m_showPlayback = true;
|
||||
}
|
||||
const auto& ctd = m_worker.GetCpuThreadData();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ButtonDisablable( ICON_FA_SLIDERS_H " CPU data", ctd.empty() ) )
|
||||
#else
|
||||
if( ButtonDisablable( "CPU data", ctd.empty() ) )
|
||||
#endif
|
||||
{
|
||||
m_showCpuDataWindow = true;
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::SmallButton( " " ICON_FA_CARET_LEFT " " ) ) ZoomToPrevFrame();
|
||||
#else
|
||||
@ -10894,33 +10922,6 @@ void View::DrawInfo()
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if( ficnt != 0 )
|
||||
{
|
||||
ImGui::Separator();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::Button( ICON_FA_PLAY " Playback" ) )
|
||||
#else
|
||||
if( ImGui::Button( "Playback" ) )
|
||||
#endif
|
||||
{
|
||||
m_showPlayback = true;
|
||||
}
|
||||
}
|
||||
|
||||
const auto& ctd = m_worker.GetCpuThreadData();
|
||||
if( !ctd.empty() )
|
||||
{
|
||||
if( ficnt != 0 ) ImGui::SameLine();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::Button( ICON_FA_SLIDERS_H " CPU data" ) )
|
||||
#else
|
||||
if( ImGui::Button( "CPU data" ) )
|
||||
#endif
|
||||
{
|
||||
m_showCpuDataWindow = true;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
TextFocused( "PID:", RealToString( m_worker.GetPid(), true ) );
|
||||
TextFocused( "Host info:", m_worker.GetHostInfo().c_str() );
|
||||
|
Loading…
Reference in New Issue
Block a user