From 5a34bd0b2fba3ac449efb50ba121c15c66275438 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 28 May 2025 17:05:18 -0700 Subject: [PATCH] Make it so when you place a new object it will select it Also deselects the current selected objects like GD --- src/game/editor.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/editor.rs b/src/game/editor.rs index 278c51f..020019c 100644 --- a/src/game/editor.rs +++ b/src/game/editor.rs @@ -178,6 +178,9 @@ pub fn object_ped( selected_obj: &mut u16 ) { if current_tab == 1 { + for object in &mut *object_grid { + object.selected = false; + } object_grid.push(ObjectStruct { x: snapped_x, y: snapped_y, @@ -185,7 +188,7 @@ pub fn object_ped( no_touch: 0, hide: 0, id: current_obj, - selected: false, + selected: true, properties: if current_obj == 23 { Some(vec![ "0".to_string(),