diff --git a/src/bin/trees/main.rs b/src/bin/trees/main.rs index e5689de..34d7465 100644 --- a/src/bin/trees/main.rs +++ b/src/bin/trees/main.rs @@ -188,7 +188,7 @@ fn dialog_engine( vec!["L"], ]; - info!("Show options: {:?}", dialog.get(*idx)); + debug!("Show options: {:?}", dialog.get(*idx)); commands.entity(*dialog_box).with_children(|parent| { if let Some(options) = dialog.get(*idx) { @@ -209,14 +209,14 @@ fn choose_dialog_option( options: Query>, dialog_box: Single>, ) { - info!("Choosing dialog {:?}", trigger.target()); + debug!("Choosing dialog {:?}", trigger.target()); - info!("Despawning dialog options"); + debug!("Despawning dialog options"); options.iter().for_each(|e| { commands.entity(e).despawn(); }); - info!("Inserting dialog line"); + debug!("Inserting dialog line"); if let Ok(t) = texts.get(trigger.target()) { commands.entity(*dialog_box).with_children(|parent| { parent.spawn((t.clone(), DialogLine)); @@ -226,21 +226,19 @@ fn choose_dialog_option( fn hover_dialog_option_over( trigger: Trigger>, - mut query: Query<(&mut TextColor, &mut BackgroundColor)>, + mut query: Query<&mut TextColor>, ) { - if let Ok((mut tc, mut bg)) = query.get_mut(trigger.target()) { + if let Ok(mut tc) = query.get_mut(trigger.target()) { *tc = TextColor(DARK_ORANGE.into()); - bg.0.set_alpha(0.9); } } fn hover_dialog_option_out( trigger: Trigger>, - mut query: Query<(&mut TextColor, &mut BackgroundColor)>, + mut query: Query<&mut TextColor>, ) { - if let Ok((mut tc, mut bg)) = query.get_mut(trigger.target()) { + if let Ok(mut tc) = query.get_mut(trigger.target()) { *tc = TextColor(ORANGE.into()); - bg.0.set_alpha(0.0); } } @@ -258,7 +256,6 @@ fn add_dialog_option(trigger: Trigger, mut commands: Comman }) .insert(TextLayout::new_with_justify(JustifyText::Center)) .insert(TextColor(ORANGE.into())) - .insert(BackgroundColor(BLACK.with_alpha(0.0).into())) .observe(choose_dialog_option) .observe(hover_dialog_option_over) .observe(hover_dialog_option_out);