mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 21:43:27 +00:00
added progress ring
This commit is contained in:
@@ -42,6 +42,25 @@ namespace omath::hud
|
||||
ImGui::GetBackgroundDrawList()->AddRectFilled(min.to_im_vec2(), max.to_im_vec2(), color.to_im_color());
|
||||
}
|
||||
|
||||
void ImguiHudRenderer::add_circle(const Vector2<float>& center, const float radius, const Color& color,
|
||||
const float thickness, const int segments)
|
||||
{
|
||||
ImGui::GetBackgroundDrawList()->AddCircle(center.to_im_vec2(), radius, color.to_im_color(), segments, thickness);
|
||||
}
|
||||
|
||||
void ImguiHudRenderer::add_filled_circle(const Vector2<float>& center, const float radius, const Color& color,
|
||||
const int segments)
|
||||
{
|
||||
ImGui::GetBackgroundDrawList()->AddCircleFilled(center.to_im_vec2(), radius, color.to_im_color(), segments);
|
||||
}
|
||||
|
||||
void ImguiHudRenderer::add_arc(const Vector2<float>& center, const float radius, const float a_min, const float a_max,
|
||||
const Color& color, const float thickness, const int segments)
|
||||
{
|
||||
ImGui::GetBackgroundDrawList()->PathArcTo(center.to_im_vec2(), radius, a_min, a_max, segments);
|
||||
ImGui::GetBackgroundDrawList()->PathStroke(color.to_im_color(), ImDrawFlags_None, thickness);
|
||||
}
|
||||
|
||||
void ImguiHudRenderer::add_text(const Vector2<float>& position, const Color& color, const std::string_view& text)
|
||||
{
|
||||
ImGui::GetBackgroundDrawList()->AddText(position.to_im_vec2(), color.to_im_color(), text.data(),
|
||||
|
||||
Reference in New Issue
Block a user