mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Extract drawing waiting dots.
This commit is contained in:
@@ -19,6 +19,19 @@ namespace tracy
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user