First set of changes to use config file instead of hard-coded settings.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user