1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![allow(unused_variables)]
use crate::prelude::Renderable;
use super::DefaultPreloader;
pub struct ApplicationSettings {
pub title: String,
pub width: u32,
pub height: u32,
pub fullscreen: bool,
pub before: Box<dyn FnOnce(u32, u32)>,
pub preloader: Box<dyn FnOnce() -> Box<dyn Renderable>>,
}
impl Default for ApplicationSettings {
fn default() -> Self {
Self {
title: String::from("UX Application"),
width: 960,
height: 540,
fullscreen: Default::default(),
before: box |w, h| {},
preloader: box || box DefaultPreloader::default(),
}
}
}