@@ 37,7 37,8 @@ fn main() {
info!("laurelin client initializing");
// dev
- app.add_plugin(EditorPlugin::default());
+ app.add_plugin(EditorPlugin::new());
+ app.insert_resource(editor_controls());
// the egui plugin is also added by the editor plugin
if !app.is_plugin_added::<EguiPlugin>() {
@@ 77,6 78,23 @@ fn setup(mut commands: Commands) {
commands.spawn(camera_bundle);
}
+fn editor_controls() -> bevy_editor_pls::controls::EditorControls {
+ use bevy_editor_pls::controls;
+
+ let mut editor_controls = controls::EditorControls::default_bindings();
+ editor_controls.unbind(controls::Action::PlayPauseEditor);
+
+ editor_controls.insert(
+ controls::Action::PlayPauseEditor,
+ controls::Binding {
+ input: controls::UserInput::Single(controls::Button::Keyboard(KeyCode::Escape)),
+ conditions: vec![controls::BindingCondition::ListeningForText(false)],
+ },
+ );
+
+ editor_controls
+}
+
#[derive(Clone, Resource)]
pub struct NetworkingOptions {
/// api address with no trailing slash