DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

07794c039f11373309117ca71adf75b5461ae616 — Jonni Liljamo 1 year, 9 months ago 1c8af04
Add ProjectDirs resource
2 files changed, 9 insertions(+), 0 deletions(-)

M sdbclient/src/cfg/mod.rs
M sdbclient/src/main.rs
M sdbclient/src/cfg/mod.rs => sdbclient/src/cfg/mod.rs +4 -0
@@ 8,6 8,10 @@

use bevy::prelude::*;

/// Stores a directories::ProjectDirs for easy access
#[derive(Resource, Debug, Component, Clone)]
pub struct CfgDirs(pub directories::ProjectDirs);

/// Various settings that can be changed from the... Settings.
#[derive(Resource, Debug, Component, PartialEq, Clone)]
pub struct CfgSettings {

M sdbclient/src/main.rs => sdbclient/src/main.rs +5 -0
@@ 78,6 78,11 @@ fn main() {
        ..Default::default()
    });

    app.insert_resource(cfg::CfgDirs(
        directories::ProjectDirs::from("com", "liljamo", "deckbuilder")
            .expect("failed to get project directories"),
    ));

    app.insert_resource(cfg::CfgSettings {
        volume_master: 7,
        fullscreen: false,