Skip to content

Commit

Permalink
Added component groups
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Nov 10, 2024
1 parent 7060da9 commit 6e1a375
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion Engine/include/Components/PhysicsMeshComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ namespace Prisma
BodyCreationSettings getBodySettings();
void addSoftBody();

private:
std::shared_ptr<BodyID> m_physicsId = nullptr;
Body* m_physicsSoftId = nullptr;

Expand Down
1 change: 1 addition & 0 deletions Engine/src/SceneObjects/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,5 +318,6 @@ std::map<std::string, std::shared_ptr<Prisma::Component>> Prisma::Node::componen
void Prisma::Node::removeComponent(const std::string& name)
{
ComponentsHandler::getInstance().removeComponent(m_components[name]);
m_components[name]->destroy();
m_components.erase(name);
}
6 changes: 5 additions & 1 deletion GUI/src/NodeViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ void Prisma::NodeViewer::showComponents(Node* nodeData)
getInstance().varsDispatcher(field, i);
}
}
ImGui::Button("Remove Component");
std::string nameRemove = "Remove Component##" + std::to_string(i);
if (ImGui::Button(nameRemove.c_str()))
{
indexRemove = component.first;
}
i++;
}
if (!indexRemove.empty())
Expand Down

0 comments on commit 6e1a375

Please sign in to comment.