Trait ambient_ui::UIExt
source · pub trait UIExt {
// Required methods
fn with_clickarea(self) -> ClickArea;
fn with_background(self, color: Vec4) -> Self;
fn with_padding_even(self, padding: f32) -> Self;
fn with_margin_even(self, margin: f32) -> Self;
}
Expand description
A trait that provides helper methods for UI elements.
Required Methods§
sourcefn with_clickarea(self) -> ClickArea
fn with_clickarea(self) -> ClickArea
Wraps this element in a ClickArea element.
sourcefn with_background(self, color: Vec4) -> Self
fn with_background(self, color: Vec4) -> Self
Adds a background color to this element.
sourcefn with_padding_even(self, padding: f32) -> Self
fn with_padding_even(self, padding: f32) -> Self
Adds padding to all sides of this element.
sourcefn with_margin_even(self, margin: f32) -> Self
fn with_margin_even(self, margin: f32) -> Self
Adds margin to all sides of this element.
Object Safety§
This trait is not object safe.