mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 20:43:27 +00:00
imroved spacer
This commit is contained in:
@@ -119,10 +119,14 @@ namespace omath::hud
|
||||
}
|
||||
|
||||
// ── Spacers ─────────────────────────────────────────────────────
|
||||
EntityOverlay& add_right_spacer(float size);
|
||||
EntityOverlay& add_left_spacer(float size);
|
||||
EntityOverlay& add_top_spacer(float size);
|
||||
EntityOverlay& add_bottom_spacer(float size);
|
||||
EntityOverlay& add_right_space_vertical(float size);
|
||||
EntityOverlay& add_right_space_horizontal(float size);
|
||||
EntityOverlay& add_left_space_vertical(float size);
|
||||
EntityOverlay& add_left_space_horizontal(float size);
|
||||
EntityOverlay& add_top_space_vertical(float size);
|
||||
EntityOverlay& add_top_space_horizontal(float size);
|
||||
EntityOverlay& add_bottom_space_vertical(float size);
|
||||
EntityOverlay& add_bottom_space_horizontal(float size);
|
||||
|
||||
// ── Progress rings ──────────────────────────────────────────────
|
||||
EntityOverlay& add_right_progress_ring(const Color& color, const Color& bg, float radius, float ratio,
|
||||
|
||||
@@ -99,8 +99,14 @@ namespace omath::hud::widget
|
||||
template<typename W>
|
||||
Centered(W) -> Centered<W>;
|
||||
|
||||
/// Empty gap that advances the side cursor without drawing.
|
||||
struct Spacer
|
||||
/// Empty vertical gap that advances the Y cursor without drawing.
|
||||
struct SpaceVertical
|
||||
{
|
||||
float size;
|
||||
};
|
||||
|
||||
/// Empty horizontal gap that advances the X cursor without drawing.
|
||||
struct SpaceHorizontal
|
||||
{
|
||||
float size;
|
||||
};
|
||||
@@ -120,7 +126,7 @@ namespace omath::hud::widget
|
||||
struct None
|
||||
{
|
||||
}; ///< No-op placeholder — used by widget::when for disabled elements.
|
||||
using SideWidget = std::variant<None, Bar, DashedBar, Label, Centered<Label>, Spacer, ProgressRing>;
|
||||
using SideWidget = std::variant<None, Bar, DashedBar, Label, Centered<Label>, SpaceVertical, SpaceHorizontal, ProgressRing>;
|
||||
|
||||
// ── Side containers ───────────────────────────────────────────────────────
|
||||
// Storing std::initializer_list<SideWidget> is safe here: the backing array
|
||||
|
||||
Reference in New Issue
Block a user