mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Show how to close a child viewport in the example
This commit is contained in:
@@ -123,6 +123,7 @@ pub trait App {
|
||||
///
|
||||
/// This is called for the root viewport ([`egui::ViewportId::ROOT`]).
|
||||
/// Use [`egui::Context::show_viewport`] to spawn additional viewports (windows).
|
||||
/// (A "viewport" in egui means an native OS window).
|
||||
fn update(&mut self, ctx: &egui::Context, frame: &mut Frame);
|
||||
|
||||
/// Get a handle to the app.
|
||||
|
||||
@@ -85,7 +85,7 @@ pub fn window_builder<E>(
|
||||
..
|
||||
} = native_options;
|
||||
|
||||
let mut viewport_builder = egui::ViewportBuilder::ROOT
|
||||
let mut viewport_builder = egui::ViewportBuilder::DEFAULTS
|
||||
.with_title(title)
|
||||
.with_decorations(*decorated)
|
||||
.with_fullscreen(*fullscreen)
|
||||
|
||||
Reference in New Issue
Block a user