Struct me3_framework::overlay::Frame
source · [−]pub struct Frame {
pub inner_margin: Margin,
pub outer_margin: Margin,
pub rounding: Rounding,
pub shadow: Shadow,
pub fill: Color32,
pub stroke: Stroke,
}
Expand description
Add a background, frame and/or margin to a rectangular background of a Ui
.
egui::Frame::none()
.fill(egui::Color32::RED)
.show(ui, |ui| {
ui.label("Label with red background");
});
Fields
inner_margin: Margin
Margin within the painted frame.
outer_margin: Margin
Margin outside the painted frame.
rounding: Rounding
shadow: Shadow
fill: Color32
stroke: Stroke
Implementations
sourceimpl Frame
impl Frame
pub fn none() -> Frame
sourcepub fn group(style: &Style) -> Frame
pub fn group(style: &Style) -> Frame
For when you want to group a few widgets together within a frame.
pub fn window(style: &Style) -> Frame
pub fn popup(style: &Style) -> Frame
sourcepub fn canvas(style: &Style) -> Frame
pub fn canvas(style: &Style) -> Frame
A canvas to draw on.
In bright mode this will be very bright, and in dark mode this will be very dark.
sourcepub fn dark_canvas(style: &Style) -> Frame
pub fn dark_canvas(style: &Style) -> Frame
A dark canvas to draw on.
sourceimpl Frame
impl Frame
pub fn fill(self, fill: Color32) -> Frame
pub fn stroke(self, stroke: Stroke) -> Frame
pub fn rounding(self, rounding: impl Into<Rounding>) -> Frame
sourcepub fn inner_margin(self, inner_margin: impl Into<Margin>) -> Frame
pub fn inner_margin(self, inner_margin: impl Into<Margin>) -> Frame
Margin within the painted frame.
sourcepub fn outer_margin(self, outer_margin: impl Into<Margin>) -> Frame
pub fn outer_margin(self, outer_margin: impl Into<Margin>) -> Frame
Margin outside the painted frame.
pub fn margin(self, margin: impl Into<Margin>) -> Frame
👎Deprecated: Renamed inner_margin in egui 0.18
pub fn shadow(self, shadow: Shadow) -> Frame
pub fn multiply_with_opacity(self, opacity: f32) -> Frame
Trait Implementations
impl Copy for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more