pub struct Skeleton {
pub width: f32,
pub height: f32,
pub speed: f32,
pub shimmer_width: f32,
/* private fields */
}Expand description
Skeleton loader for placeholder content
A shimmer effect that animates across a rectangular area, useful for indicating loading content.
§Example
use armas_basic::components::Skeleton;
fn ui(ui: &mut egui::Ui, skeleton: &mut Skeleton) {
skeleton.show(ui);
}Fields§
§width: f32Width of the skeleton
height: f32Height of the skeleton
speed: f32Animation speed
shimmer_width: f32Width of the shimmer effect
Implementations§
Source§impl Skeleton
impl Skeleton
Sourcepub const fn new(width: f32, height: f32) -> Self
pub const fn new(width: f32, height: f32) -> Self
Create a new skeleton loader
Colors default to theme surface_variant and surface
Sourcepub const fn base_color(self, color: Color32) -> Self
pub const fn base_color(self, color: Color32) -> Self
Set the base color (overrides theme)
Sourcepub const fn highlight_color(self, color: Color32) -> Self
pub const fn highlight_color(self, color: Color32) -> Self
Set the highlight color (overrides theme)
Sourcepub const fn corner_radius(self, radius: f32) -> Self
pub const fn corner_radius(self, radius: f32) -> Self
Set the corner radius (overrides theme)
Sourcepub const fn shimmer_width(self, width: f32) -> Self
pub const fn shimmer_width(self, width: f32) -> Self
Set the shimmer width (as a fraction of total width)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Skeleton
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnsafeUnpin for Skeleton
impl UnwindSafe for Skeleton
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more