Skip to content

Commit 5a34bd0

Browse files
committed
Make it so when you place a new object it will select it
Also deselects the current selected objects like GD
1 parent f78d7e7 commit 5a34bd0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/game/editor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,17 @@ pub fn object_ped(
178178
selected_obj: &mut u16
179179
) {
180180
if current_tab == 1 {
181+
for object in &mut *object_grid {
182+
object.selected = false;
183+
}
181184
object_grid.push(ObjectStruct {
182185
x: snapped_x,
183186
y: snapped_y,
184187
rotation: 0,
185188
no_touch: 0,
186189
hide: 0,
187190
id: current_obj,
188-
selected: false,
191+
selected: true,
189192
properties: if current_obj == 23 {
190193
Some(vec![
191194
"0".to_string(),

0 commit comments

Comments
 (0)