First set of changes to use config file instead of hard-coded settings.

This commit is contained in:
2026-05-23 11:25:41 +01:00
parent 391380040e
commit 74aa9e8a84
6 changed files with 85 additions and 19 deletions
+9 -1
View File
@@ -1,5 +1,6 @@
use sdl3::{Sdl, pixels::Color, render::Canvas, ttf::Font, video::Window};
extern crate serde;
extern crate serde_derive;
pub struct Screen<'a> {
pub(crate) canvas: Box<Canvas<Window>>,
@@ -8,9 +9,16 @@ pub struct Screen<'a> {
pub(crate) context: Box<Sdl>
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Prefs {
#[serde(rename = "font-path")]
pub font_path: String,
#[serde(rename = "width")]
pub screen_width: u32,
#[serde(rename = "height")]
pub screen_height: u32,
}