fixed additions in structure mode. proof of selectable mode

This commit is contained in:
Lillian Vixe 2024-06-03 15:47:29 -07:00
parent a67beb77bd
commit b6a2fbb82c

View file

@ -504,6 +504,33 @@ pub fn edit_window_ui(
}
}
});
ui.collapsing("grid assets", |ui| {
//
for (id, _asset) in (&grid_assets).iter() {
let path = asset_server.get_path(id.untyped());
if let Some(path) = path {
ui.label(path.to_string().as_str());
}
}
});
ui.collapsing("structure assets", |ui| {
ui.radio_value(
&mut shared_ui_state.selected_structure,
"".to_string(),
"Deselect",
);
for (id, _asset) in (&structure_assets).iter() {
let path = asset_server.get_path(id.untyped());
if let Some(path) = path {
//ui.label(path.to_string().as_str());
ui.radio_value(
&mut shared_ui_state.selected_structure,
path.to_string(),
path.to_string().as_str(),
);
}
}
});
let mut selected_structure = false;
let mut selection = None;
if shared_ui_state.selected_structure != "" {
@ -568,24 +595,6 @@ pub fn edit_window_ui(
})
});
}
ui.collapsing("grid assets", |ui| {
//
for (id, _asset) in (&grid_assets).iter() {
let path = asset_server.get_path(id.untyped());
if let Some(path) = path {
ui.label(path.to_string().as_str());
}
}
});
ui.collapsing("structure assets", |ui| {
//
for (id, _asset) in (&structure_assets).iter() {
let path = asset_server.get_path(id.untyped());
if let Some(path) = path {
ui.label(path.to_string().as_str());
}
}
});
if ui.button("Save Any Changes").clicked() {
for each in &mut shared_ui_state.grids {
if each.has_changed_since_last_save {