|
|
|
@ -97,7 +97,7 @@ fn init_debug_ui(mut commands: Commands) {
|
|
|
|
justify_self: JustifySelf::Start,
|
|
|
|
justify_self: JustifySelf::Start,
|
|
|
|
..default()
|
|
|
|
..default()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
));
|
|
|
|
)).observe(close_on_click);
|
|
|
|
|
|
|
|
|
|
|
|
// "Turn on Debugging" button
|
|
|
|
// "Turn on Debugging" button
|
|
|
|
commands
|
|
|
|
commands
|
|
|
|
@ -390,3 +390,12 @@ fn toggle_debug(
|
|
|
|
DebuggingState::Off => DebuggingState::On,
|
|
|
|
DebuggingState::Off => DebuggingState::On,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn close_on_click(
|
|
|
|
|
|
|
|
trigger: Trigger<Pointer<Click>>,
|
|
|
|
|
|
|
|
mut query: Query<&mut Visibility>,
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
if let Ok(mut v) = query.get_mut(trigger.target()) {
|
|
|
|
|
|
|
|
*v = Visibility::Hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|