diff --git a/src/instance/content/mods.rs b/src/instance/content/mods.rs index a1a1f8c..bfea1b8 100644 --- a/src/instance/content/mods.rs +++ b/src/instance/content/mods.rs @@ -226,8 +226,8 @@ pub(crate) fn make_icon_pixels( Some(rows) } -/// 6x3 fallback icon showing a "?" pattern for mods without icons. -fn fallback_icon() -> Vec> { +// 6x3 fallback icon showing a "?" pattern for mods without icons. +pub(super) fn fallback_icon() -> Vec> { let b = IconCell { bg_r: 50, bg_g: 50, @@ -259,6 +259,42 @@ fn fallback_icon() -> Vec> { ] } +// 12x6 fallback icon showing a "?" pattern for worlds without icons. +pub(super) fn fallback_icon_large() -> Vec> { + let b = IconCell { + bg_r: 50, + bg_g: 50, + bg_b: 50, + fg_r: 50, + fg_g: 50, + fg_b: 50, + }; + let tb = IconCell { + bg_r: 50, + bg_g: 50, + bg_b: 50, + fg_r: 130, + fg_g: 130, + fg_b: 130, + }; + let bt = IconCell { + bg_r: 130, + bg_g: 130, + bg_b: 130, + fg_r: 50, + fg_g: 50, + fg_b: 50, + }; + vec![ + vec![b, b, tb, tb, tb, tb, tb, tb, tb, tb, b, b], + vec![b, b, tb, tb, tb, tb, tb, tb, tb, tb, b, b], + vec![b, b, b, b, b, b, bt, bt, bt, bt, b, b], + vec![b, b, b, b, b, b, bt, bt, bt, bt, b, b], + vec![b, b, b, b, bt, bt, bt, bt, b, b, b, b], + vec![b, b, b, b, bt, bt, bt, bt, b, b, b, b], + ] +} + // enable/disable by renaming the file with/without ".disabled" suffix. // the minecraft way, apparently. pub fn toggle_entry(entry: &ContentEntry) -> Result<(), std::io::Error> { diff --git a/src/instance/content/resource_packs.rs b/src/instance/content/resource_packs.rs index 0fb17bf..22be392 100644 --- a/src/instance/content/resource_packs.rs +++ b/src/instance/content/resource_packs.rs @@ -80,7 +80,8 @@ pub fn scan_resource_packs(instances_dir: &Path, instance_name: &str) -> Vec Vec