diff --git a/src/editor.rs b/src/editor.rs index b09f011..84ea2ed 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -720,15 +720,15 @@ impl Editor { ); let y = footer_top as i32 + 49; - if simple_button(d, 100, y, 40, 40) { - self.save_blueprint(selection); - } - draw_scaled_texture(d, textures.get("save"), 104, y + 4, 2.); - - if simple_button(d, 144, y, 40, 40) { + if simple_button(d, 100, y, 40, 40) || d.is_key_pressed(KeyboardKey::KEY_ESCAPE) { self.active_tool = Tool::SelectArea(Selection::default()); } - draw_scaled_texture(d, textures.get("cancel"), 148, y + 4, 2.); + draw_scaled_texture(d, textures.get("cancel"), 104, y + 4, 2.); + + if simple_button(d, 144, y, 40, 40) { + self.save_blueprint(selection); + } + draw_scaled_texture(d, textures.get("save"), 148, y + 4, 2.); if simple_button(d, 188, y, 40, 40) || (d.is_key_pressed(KeyboardKey::KEY_C)