move selection cancel button to the start and clear selection on esc
This commit is contained in:
parent
96f1a8367f
commit
859e39875a
1 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue