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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user