Don't show pause/resume button if data is static.

This commit is contained in:
Bartosz Taudul 2018-03-24 14:45:01 +01:00
parent d8ac7dee83
commit cb4c1dac24

View File

@ -289,8 +289,11 @@ void View::DrawImpl()
std::lock_guard<NonRecursiveBenaphore> lock( m_worker.GetDataLock() ); std::lock_guard<NonRecursiveBenaphore> lock( m_worker.GetDataLock() );
ImGui::Begin( m_worker.GetCaptureName().c_str(), nullptr, ImGuiWindowFlags_NoScrollbar ); ImGui::Begin( m_worker.GetCaptureName().c_str(), nullptr, ImGuiWindowFlags_NoScrollbar );
if( !m_worker.IsDataStatic() )
{
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 70, 0 ) ) ) m_pause = !m_pause; if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 70, 0 ) ) ) m_pause = !m_pause;
ImGui::SameLine(); ImGui::SameLine();
}
if( ImGui::Button( "Options", ImVec2( 70, 0 ) ) ) m_showOptions = true; if( ImGui::Button( "Options", ImVec2( 70, 0 ) ) ) m_showOptions = true;
ImGui::SameLine(); ImGui::SameLine();
if( ImGui::Button( "Messages", ImVec2( 70, 0 ) ) ) m_showMessages = true; if( ImGui::Button( "Messages", ImVec2( 70, 0 ) ) ) m_showMessages = true;