MCPcopy Create free account
hub / github.com/17cupsofcoffee/nova / new

Method new

src/app.rs:32–46  ·  view source on GitHub ↗
(title: &str, width: i32, height: i32, tick_rate: f64)

Source from the content-addressed store, hash-verified

30
31impl App {
32 pub fn new(title: &str, width: i32, height: i32, tick_rate: f64) -> App {
33 let mut window = Window::new(title, width, height);
34 let gfx = Graphics::new(&mut window);
35 let input = Input::new();
36 let timer = Timer::new(tick_rate);
37
38 App {
39 window,
40 gfx,
41 input,
42 timer,
43
44 is_running: true,
45 }
46 }
47
48 pub fn run(&mut self, event_handler: &mut impl EventHandler) {
49 self.timer.reset();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected