DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

3575d638643ca080d0783129005b089ae7b9ad97 — skye 1 year, 7 months ago 5c01b02
feat(client): change editor binds to saner ones
1 files changed, 19 insertions(+), 1 deletions(-)

M client/src/main.rs
M client/src/main.rs => client/src/main.rs +19 -1
@@ 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