Add background tasks notification tooltip.

This commit is contained in:
Bartosz Taudul 2019-07-25 21:21:20 +02:00
parent 9f29ddd562
commit 5f96c55a3e

View File

@ -635,6 +635,15 @@ bool View::DrawImpl()
ImGui::TextUnformatted( " " ); ImGui::TextUnformatted( " " );
ImGui::GetWindowDrawList()->AddCircleFilled( pos + ImVec2( 0, ty * 0.75f ), ty * ( 0.2f + ( sin( s_time * 8 ) + 1 ) * 0.125f ), 0xFF888888, 10 ); ImGui::GetWindowDrawList()->AddCircleFilled( pos + ImVec2( 0, ty * 0.75f ), ty * ( 0.2f + ( sin( s_time * 8 ) + 1 ) * 0.125f ), 0xFF888888, 10 );
#endif #endif
auto rmin = ImGui::GetItemRectMin();
rmin.x -= ty * 0.5f;
const auto rmax = ImGui::GetItemRectMax();
if( ImGui::IsMouseHoveringRect( rmin, rmax ) )
{
ImGui::BeginTooltip();
ImGui::TextUnformatted( "Processing background tasks" );
ImGui::EndTooltip();
}
} }
if( m_saveThreadState.load( std::memory_order_relaxed ) == SaveThreadState::Saving ) if( m_saveThreadState.load( std::memory_order_relaxed ) == SaveThreadState::Saving )
{ {