1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Now viewport_id always will be in a ViewportId you cannot create a ViewportId you can only get the main one everywere or get the current viewport id with Context::get_viewport_id

This commit is contained in:
Konkitoman
2023-08-09 18:33:59 +03:00
parent 1a7c4700fd
commit 86ef11c521
34 changed files with 775 additions and 663 deletions

View File

@@ -39,7 +39,9 @@ fn main() {
if show_sync {
ctx.create_viewport_sync(
ViewportBuilder::default().with_title("Sync rendering!"),
|ctx, viewport_id, parent_viewport_id| {
|ctx| {
let viewport_id = ctx.get_viewport_id();
let parent_viewport_id = ctx.get_parent_viewport_id();
egui::CentralPanel::default().show(ctx, |ui| {
ui.label(format!("Frame: {}", ui.ctx().frame_nr()));
ui.horizontal(|ui| {