Mesh_Entities!
This commit is contained in:
@@ -54,6 +54,33 @@ editor_ui :: () {
|
||||
}
|
||||
|
||||
ImGui.End();
|
||||
|
||||
ImGui.Begin("Create Mesh Entity", flags=ImGui.WindowFlags.NoResize);
|
||||
|
||||
for mesh_entity_files {
|
||||
ImGui.PushID(to_temp_c_string(it.full_path)) ;
|
||||
defer ImGui.PopID();
|
||||
|
||||
if ImGui.Button(to_temp_c_string(it.full_path)) {
|
||||
mesh_entity := new_mesh_entity(init=false);
|
||||
mesh_entity.model_path = it.full_path;
|
||||
init_entity(mesh_entity);
|
||||
new_entity = mesh_entity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//set_position(*new_entity.transform, engine.editor.camera.position + engine.editor.camera.forward * 20.0);
|
||||
//engine.editor.selected_entities.count = 0;
|
||||
//array_add(*engine.editor.selected_entities, new_entity);
|
||||
|
||||
ImGui.End();
|
||||
|
||||
if new_entity != null {
|
||||
set_position(*new_entity.transform, engine.editor.camera.position + engine.editor.camera.forward * 20.0);
|
||||
engine.editor.selected_entities.count = 0;
|
||||
array_add(*engine.editor.selected_entities, new_entity);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Begin("Entities");
|
||||
|
||||
Reference in New Issue
Block a user