pub fn run_with_app_data<T>(self, app_data: T) -> Result<(), tetra::TetraError>
    where
        T: 'static,
    {
        // Create a new tetra context, setting the wind,ow title and size
        tetra::ContextBuilder::new(&self.window_title, self.window_size.0, self.window_size.1)
            // Configure the tetra window options
            .resizable(true)
            .key_repeat(true)
            .show_mouse(true)
            .build()?
            // And run the Tetra game. We pass it a closure that returns our App
            .run(|context| {
                App::<T>::new(
                    context,
                    self.widget_tree,
                    tetra::graphics::Color::rgba(
                        self.clear_color.r,
                        self.clear_color.g,
                        self.clear_color.b,
                        self.clear_color.a,
                    ),
                    app_data,
                    self.on_update,
                    self.on_event,
                    self.on_draw,
                )
            })?;

        Ok(())
    }
/// Run the app with additional application data!
///
/// Displays the window and runs the RAUI UI. App data is used by RAUI as process context.
Run the app with additional application data.
Displays the window and runs the RAUI UI. App data is used by RAUI as process context.
Run the app with additional application data . Displays the window and runs the RAUI UI . App data is used by RAUI as process context .
pub fn run_with_app_data<T>(self, app_data: T) -> Result<(), tetra::TetraError>
    where
        T: 'static,
    {
        // Create a new tetra context, setting the wind,ow title and size
        tetra::ContextBuilder::new(&self.window_title, self.window_size.0, self.window_size.1)
            // Configure the tetra window options
            .resizable(true)
            .key_repeat(true)
            .show_mouse(true)
            .build()?
            // And run the Tetra game. We pass it a closure that returns our App
            .run(|context| {
                App::<T>::new(
                    context,
                    self.widget_tree,
                    tetra::graphics::Color::rgba(
                        self.clear_color.r,
                        self.clear_color.g,
                        self.clear_color.b,
                        self.clear_color.a,
                    ),
                    app_data,
                    self.on_update,
                    self.on_event,
                    self.on_draw,
                )
            })?;
        Ok(())
    }
pub fn run_with_app_data < T > ( self , app_data : T ) -> Result < ( ) , tetra :: TetraError > where T : ' static , { // Create a new tetra context, setting the wind,ow title and size tetra :: ContextBuilder :: new ( & self . window_title , self . window_size . 0 , self . window_size . 1 ) // Configure the tetra window options . resizable ( true ) . key_repeat ( true ) . show_mouse ( true ) . build ( ) ? // And run the Tetra game. We pass it a closure that returns our App . run ( | context | { App :: < T > :: new ( context , self . widget_tree , tetra :: graphics :: Color :: rgba ( self . clear_color . r , self . clear_color . g , self . clear_color . b , self . clear_color . a , ) , app_data , self . on_update , self . on_event , self . on_draw , ) } ) ? ; Ok ( ( ) ) }
Run the app with additional application data!
Run the app with additional application data!
self
app_data
T
self
app_data
T