Struct me3_framework::overlay::containers::panel::CentralPanel
source · [−]pub struct CentralPanel { /* private fields */ }
Expand description
A panel that covers the remainder of the screen, i.e. whatever area is left after adding other panels.
The order in which you add panels matter! The first panel you add will always be the outermost, and the last you add will always be the innermost.
⚠ CentralPanel
must be added after all other panels!
NOTE: Any Window
s and Area
s will cover the top-level CentralPanel
.
See the module level docs for more details.
egui::TopBottomPanel::top("my_panel").show(ctx, |ui| {
ui.label("Hello World! From `TopBottomPanel`, that must be before `CentralPanel`!");
});
egui::CentralPanel::default().show(ctx, |ui| {
ui.label("Hello World!");
});
Implementations
sourceimpl CentralPanel
impl CentralPanel
sourcepub fn frame(self, frame: Frame) -> CentralPanel
pub fn frame(self, frame: Frame) -> CentralPanel
Change the background color, margins, etc.
sourceimpl CentralPanel
impl CentralPanel
sourcepub fn show_inside<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R
) -> InnerResponse<R>
pub fn show_inside<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R
) -> InnerResponse<R>
Show the panel inside a Ui
.
Trait Implementations
sourceimpl Default for CentralPanel
impl Default for CentralPanel
sourcefn default() -> CentralPanel
fn default() -> CentralPanel
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CentralPanel
impl Send for CentralPanel
impl Sync for CentralPanel
impl Unpin for CentralPanel
impl UnwindSafe for CentralPanel
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