1
0
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:
Emil Ernerfeldt
2023-11-15 17:49:42 +01:00
parent ccf96ceb93
commit 6f98994a7c
8 changed files with 72 additions and 36 deletions

View File

@@ -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.

View File

@@ -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)