uidev: support external paths

This commit is contained in:
galister
2025-12-06 12:01:51 +09:00
parent d50b3b6da7
commit e83997bc08
3 changed files with 19 additions and 4 deletions

View File

@@ -20,7 +20,11 @@ pub struct TestbedAny {
impl TestbedAny {
pub fn new(name: &str) -> anyhow::Result<Self> {
let path = AssetPath::BuiltIn(&format!("gui/{name}.xml"));
let path = if name.ends_with(".xml") {
AssetPath::Filesystem(name)
} else {
AssetPath::BuiltIn(&format!("gui/{name}.xml"))
};
let globals = WguiGlobals::new(
Box::new(assets::Asset {}),