Skip to content

Commit

Permalink
The default layout is now copied into place like the others.
Browse files Browse the repository at this point in the history
A step along the way toward making layout files selectable, maybe?
  • Loading branch information
ceejbot committed Dec 18, 2023
1 parent ca18fd1 commit 348f535
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 275 deletions.
272 changes: 0 additions & 272 deletions installer/core/SKSE/plugins/SoulsyHUD_Layout.toml

This file was deleted.

Binary file modified installer/fomod/ModuleConfig.xml
Binary file not shown.
6 changes: 4 additions & 2 deletions src/layouts/layout_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ impl HudLayout2 {
}

pub fn fallback() -> Self {
let buf = include_str!("../../installer/core/SKSE/plugins/SoulsyHUD_Layout.toml");
let buf =
include_str!("../../installer/core/SKSE/plugins/soulsy_layouts/SoulsyHUD_default.toml");
match toml::from_str::<HudLayout2>(buf) {
Ok(v) => v,
Err(e) => {
Expand Down Expand Up @@ -294,7 +295,8 @@ mod tests {

#[test]
fn default_layout_valid() {
let buf = include_str!("../../installer/core/SKSE/plugins/SoulsyHUD_Layout.toml");
let buf =
include_str!("../../installer/core/SKSE/plugins/soulsy_layouts/SoulsyHUD_default.toml");
match toml::from_str::<HudLayout2>(buf) {
Ok(v) => {
assert_eq!(v.anchor_point().x, 150.0);
Expand Down
4 changes: 3 additions & 1 deletion src/layouts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ mod tests {

#[test]
fn default_layout_exists() {
let fpath = std::path::Path::new("installer/core/SKSE/plugins/SoulsyHUD_Layout.toml");
let fpath = std::path::Path::new(
"installer/core/SKSE/plugins/soulsy_layouts/SoulsyHUD_default.toml",
);
assert!(fpath.exists());
}

Expand Down

0 comments on commit 348f535

Please sign in to comment.