pub fn with_config(&mut self, config: DisplayConfig) -> &mut Self {
        self.config = config;
        let mut wb = self.winit_builder.clone();
        wb = wb.with_title(self.config.title.clone())
            .with_visibility(self.config.visibility);

        if self.config.fullscreen {
            wb = wb.with_fullscreen(Some(self.events.get_primary_monitor()));
        }
        match self.config.dimensions {
            Some((width, height)) => {
                wb = wb.with_dimensions(width, height);
            }
            _ => (),
        }
        match self.config.min_dimensions {
            Some((width, height)) => {
                wb = wb.with_min_dimensions(width, height);
            }
            _ => (),
        }
        match self.config.max_dimensions {
            Some((width, height)) => {
                wb = wb.with_max_dimensions(width, height);
            }
            _ => (),
        }
        self.winit_builder = wb;
        self
    }
/// Applies configuration from `Config`
Applies configuration from `Config`
Applies configuration from ` Config `
pub fn with_config(&mut self, config: DisplayConfig) -> &mut Self {
        self.config = config;
        let mut wb = self.winit_builder.clone();
        wb = wb.with_title(self.config.title.clone())
            .with_visibility(self.config.visibility);
        if self.config.fullscreen {
            wb = wb.with_fullscreen(Some(self.events.get_primary_monitor()));
        }
        match self.config.dimensions {
            Some((width, height)) => {
                wb = wb.with_dimensions(width, height);
            }
            _ => (),
        }
        match self.config.min_dimensions {
            Some((width, height)) => {
                wb = wb.with_min_dimensions(width, height);
            }
            _ => (),
        }
        match self.config.max_dimensions {
            Some((width, height)) => {
                wb = wb.with_max_dimensions(width, height);
            }
            _ => (),
        }
        self.winit_builder = wb;
        self
    }
pub fn with_config ( & mut self , config : DisplayConfig ) -> & mut Self { self . config = config ; let mut wb = self . winit_builder . clone ( ) ; wb = wb . with_title ( self . config . title . clone ( ) ) . with_visibility ( self . config . visibility ) ; if self . config . fullscreen { wb = wb . with_fullscreen ( Some ( self . events . get_primary_monitor ( ) ) ) ; } match self . config . dimensions { Some ( ( width , height ) ) => { wb = wb . with_dimensions ( width , height ) ; } _ => ( ) , } match self . config . min_dimensions { Some ( ( width , height ) ) => { wb = wb . with_min_dimensions ( width , height ) ; } _ => ( ) , } match self . config . max_dimensions { Some ( ( width , height ) ) => { wb = wb . with_max_dimensions ( width , height ) ; } _ => ( ) , } self . winit_builder = wb ; self }
Applies configuration from `Config`
Applies configuration from ` Config `
&mut self
config
DisplayConfig
&mut self
config
DisplayConfig