mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Extract drawing waiting dots.
This commit is contained in:
parent
a4740c1b1c
commit
d5914d2e7b
@ -391,16 +391,8 @@ int main( int argc, char** argv )
|
|||||||
{
|
{
|
||||||
tracy::TextCentered( ICON_FA_HOURGLASS_HALF );
|
tracy::TextCentered( ICON_FA_HOURGLASS_HALF );
|
||||||
|
|
||||||
ImGui::TextUnformatted( "" );
|
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
|
||||||
const auto wpos = ImGui::GetWindowPos();
|
|
||||||
const auto ty = ImGui::GetFontSize();
|
|
||||||
const auto h = ImGui::GetCursorPosY() - ty * 0.5f;
|
|
||||||
const auto w = ImGui::GetWindowWidth();
|
|
||||||
time += io.DeltaTime;
|
time += io.DeltaTime;
|
||||||
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f - ty, h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f + 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
tracy::DrawWaitingDots( time );
|
||||||
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f , h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
|
||||||
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f + ty, h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
|
||||||
|
|
||||||
auto currProgress = progress.progress.load( std::memory_order_relaxed );
|
auto currProgress = progress.progress.load( std::memory_order_relaxed );
|
||||||
if( totalProgress == 0 )
|
if( totalProgress == 0 )
|
||||||
|
@ -19,6 +19,19 @@ namespace tracy
|
|||||||
ImGui::Text( "%s", text );
|
ImGui::Text( "%s", text );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void DrawWaitingDots( double time )
|
||||||
|
{
|
||||||
|
ImGui::TextUnformatted( "" );
|
||||||
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
|
const auto wpos = ImGui::GetWindowPos();
|
||||||
|
const auto ty = ImGui::GetFontSize();
|
||||||
|
const auto h = ImGui::GetCursorPosY() - ty * 0.5f;
|
||||||
|
const auto w = ImGui::GetWindowWidth();
|
||||||
|
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f - ty, h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f + 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
||||||
|
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f , h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
||||||
|
draw->AddCircleFilled( wpos + ImVec2( w * 0.5f + ty, h ), ty * ( 0.15f + 0.2f * ( pow( cos( time * 3.5f - 0.3f ), 16.f ) ) ), 0xFFBBBBBB, 12 );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user