added progress ring

This commit is contained in:
2026-03-16 03:03:23 +03:00
parent fd531c930c
commit d8632dc74c
8 changed files with 196 additions and 6 deletions

View File

@@ -105,11 +105,22 @@ namespace omath::hud::widget
float size;
};
struct ProgressRing
{
Color color;
Color bg{0.3f, 0.3f, 0.3f, 0.5f};
float radius = 12.f;
float ratio;
float thickness = 2.f;
float offset = 5.f;
int segments = 32;
};
// ── Side widget variant ───────────────────────────────────────────────────
struct None
{
}; ///< No-op placeholder — used by widget::when for disabled elements.
using SideWidget = std::variant<None, Bar, DashedBar, Label, Centered<Label>, Spacer>;
using SideWidget = std::variant<None, Bar, DashedBar, Label, Centered<Label>, Spacer, ProgressRing>;
// ── Side containers ───────────────────────────────────────────────────────
// Storing std::initializer_list<SideWidget> is safe here: the backing array