Fix audio feature
This commit is contained in:
parent
10cb0a997f
commit
d5fee4d486
3 changed files with 6 additions and 5 deletions
|
@ -20,3 +20,4 @@ ecs = { git = "https://gavania.de/hodasemi/ecs.git" }
|
||||||
audio = { git = "https://gavania.de/hodasemi/audio.git", optional = true }
|
audio = { git = "https://gavania.de/hodasemi/audio.git", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["audio"]
|
||||||
|
|
|
@ -26,7 +26,7 @@ impl GuiBuilder {
|
||||||
pub fn new(world: &mut World, path: &AssetPath) -> Result<Arc<Self>> {
|
pub fn new(world: &mut World, path: &AssetPath) -> Result<Arc<Self>> {
|
||||||
let validator = Validator::new(
|
let validator = Validator::new(
|
||||||
#[cfg(feature = "audio")]
|
#[cfg(feature = "audio")]
|
||||||
gui_handler,
|
world.resources.get::<GuiHandler>(),
|
||||||
path,
|
path,
|
||||||
)
|
)
|
||||||
.with_context(|| format!("validator for {}", path.full_path()))?;
|
.with_context(|| format!("validator for {}", path.full_path()))?;
|
||||||
|
@ -39,7 +39,7 @@ impl GuiBuilder {
|
||||||
pub fn from_str(world: &mut World, s: &str) -> Result<Arc<Self>> {
|
pub fn from_str(world: &mut World, s: &str) -> Result<Arc<Self>> {
|
||||||
let validator = Validator::from_str(
|
let validator = Validator::from_str(
|
||||||
#[cfg(feature = "audio")]
|
#[cfg(feature = "audio")]
|
||||||
gui_handler,
|
world.resources.get::<GuiHandler>(),
|
||||||
s,
|
s,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ impl GuiBuilder {
|
||||||
for path in pathes.into_iter() {
|
for path in pathes.into_iter() {
|
||||||
let validator = Validator::new(
|
let validator = Validator::new(
|
||||||
#[cfg(feature = "audio")]
|
#[cfg(feature = "audio")]
|
||||||
gui_handler,
|
world.resources.get::<GuiHandler>(),
|
||||||
path,
|
path,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl GuiSnippet {
|
||||||
pub fn new(world: &mut World, path: &AssetPath) -> Result<Arc<Self>> {
|
pub fn new(world: &mut World, path: &AssetPath) -> Result<Arc<Self>> {
|
||||||
let validator = Validator::new(
|
let validator = Validator::new(
|
||||||
#[cfg(feature = "audio")]
|
#[cfg(feature = "audio")]
|
||||||
world,
|
world.resources.get::<GuiHandler>(),
|
||||||
path,
|
path,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ impl GuiSnippet {
|
||||||
pub fn from_str(world: &mut World, s: &str) -> Result<Arc<Self>> {
|
pub fn from_str(world: &mut World, s: &str) -> Result<Arc<Self>> {
|
||||||
let validator = Validator::from_str(
|
let validator = Validator::from_str(
|
||||||
#[cfg(feature = "audio")]
|
#[cfg(feature = "audio")]
|
||||||
gui_handler,
|
world.resources.get::<GuiHandler>(),
|
||||||
s,
|
s,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue