pub fn rebuild(&mut self, debug_info: &mut DebugInfo, data: &WindowData) -> Result<()> {
        self.update();

        let mut layers = Vec::new();

        // Always draw debug info
        {
            //layers.push(self.draw_debug_info(debug_info.get_debug_info()));
        }

        // Draw menu
        if self.show_menu {
            layers.push(self.draw_menu());
        }

        let (win_w, win_h) = (
            data.logical_window_size.width,
            data.logical_window_size.height,
        );
        self.ui.rebuild(
            layers,
            Size {
                width: win_w as f32,
                height: win_h as f32,
            },
        );

        Ok(())
    }
/// Rebuild the Ui if it changed
Rebuild the Ui if it changed
Rebuild the Ui if it changed
pub fn rebuild(&mut self, debug_info: &mut DebugInfo, data: &WindowData) -> Result<()> {
        self.update();
        let mut layers = Vec::new();
        // Always draw debug info
        {
            //layers.push(self.draw_debug_info(debug_info.get_debug_info()));
        }
        // Draw menu
        if self.show_menu {
            layers.push(self.draw_menu());
        }
        let (win_w, win_h) = (
            data.logical_window_size.width,
            data.logical_window_size.height,
        );
        self.ui.rebuild(
            layers,
            Size {
                width: win_w as f32,
                height: win_h as f32,
            },
        );
        Ok(())
    }
pub fn rebuild ( & mut self , debug_info : & mut DebugInfo , data : & WindowData ) -> Result < ( ) > { self . update ( ) ; let mut layers = Vec :: new ( ) ; // Always draw debug info { //layers.push(self.draw_debug_info(debug_info.get_debug_info())); } // Draw menu if self . show_menu { layers . push ( self . draw_menu ( ) ) ; } let ( win_w , win_h ) = ( data . logical_window_size . width , data . logical_window_size . height , ) ; self . ui . rebuild ( layers , Size { width : win_w as f32 , height : win_h as f32 , } , ) ; Ok ( ( ) ) }
Rebuild the Ui if it changed
Rebuild the Ui if it changed
&mut self
debug_info
&mut DebugInfo
data
&WindowData
&mut self
debug_info
&mut DebugInfo
data
&WindowData