Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use egui::ViewportBuilder in eframe::NativeOptions #3572

Merged
merged 22 commits into from
Nov 19, 2023

Conversation

emilk
Copy link
Owner

@emilk emilk commented Nov 18, 2023

This PR replaces a bunch of options in eframe::NativeOptions with egui::ViewportBuilder. For instance:

 let options = eframe::NativeOptions {
-    initial_window_size: Some(egui::vec2(320.0, 240.0)),
-    drag_and_drop_support: true,
+    viewport: egui::ViewportBuilder::default()
+        .with_inner_size([320.0, 240.0])
+        .with_drag_and_drop(true),
     centered: true,
     ..Default::default()
 };

@emilk emilk added eframe Relates to epi and eframe egui labels Nov 18, 2023
@emilk emilk merged commit 39e60e3 into master Nov 19, 2023
35 checks passed
@emilk emilk deleted the emilk/viewport-builder-eframe branch November 19, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant