Function run

Source
pub fn run(
    width: usize,
    height: usize,
    title: &str,
    system: Box<dyn System>,
    options: Options,
) -> Result<(), GraphicsError>
Expand description

Create and run a loop using Pixels and Winit

If you want to use [Scene][scenes::Scene]s consider [run_scenes][scenes::run_scenes]

§Arguments

  • width - Width of the whole window canvas in pixels
  • height - Height of the whole window canvas in pixels
  • title - Window title
  • system - Your program
  • options - Options controls how fast the program can update, [UiElement] styling, etc

§Returns

Returns when the program is finished executing either due to it quitting or a fatal error occurring