-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.rs
50 lines (44 loc) · 1.14 KB
/
main.rs
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
39
40
41
42
43
44
45
46
47
48
49
50
mod pad_scene;
mod pad_view;
mod preview;
use crate::pad_scene::PadScene;
use anyhow::Result;
use pixels_graphics_lib::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
struct Settings {
pub width: usize,
pub height: usize,
pub dots: Vec<bool>,
pub guides: Vec<bool>,
}
fn settings() -> AppPrefs<Settings> {
AppPrefs::new("app", "emmabritton", "fontpad", || Settings {
width: 5,
height: 5,
dots: vec![false; 25],
guides: vec![false; 25],
})
.expect("Unable to create prefs file")
}
fn main() -> Result<()> {
let window_prefs = WindowPreferences::new("com", "emmabritton", "fontpad", 1)?;
let options = Options::default();
let switcher: SceneSwitcher<SceneResult, SceneName> = |_, _, _| {};
let first_scene = PadScene::new(&options.style);
run_scenes(
300,
250,
"Font Pad",
Some(window_prefs),
switcher,
first_scene,
options,
empty_pre_post(),
)?;
Ok(())
}
#[derive(Clone, Debug, PartialEq)]
enum SceneName {}
#[derive(Clone, Debug, PartialEq)]
enum SceneResult {}