1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Add NativeOptions::window_builder for more customization (#3390)

* added a window builder hook for more customization

* `EFrame` -> `eframe`

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Simon
2023-09-27 02:52:49 -04:00
committed by GitHub
parent b3e19f5b7d
commit 4986b35701
3 changed files with 34 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ pub fn read_window_info(
pub fn window_builder<E>(
event_loop: &EventLoopWindowTarget<E>,
title: &str,
native_options: &epi::NativeOptions,
native_options: &mut epi::NativeOptions,
window_settings: Option<WindowSettings>,
) -> winit::window::WindowBuilder {
let epi::NativeOptions {
@@ -179,7 +179,10 @@ pub fn window_builder<E>(
}
}
window_builder
match std::mem::take(&mut native_options.window_builder) {
Some(hook) => hook(window_builder),
None => window_builder,
}
}
pub fn apply_native_options_to_window(