mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Added the ability to remove components
This commit is contained in:
@@ -548,7 +548,7 @@ void EditorSelectionPanel::DrawNetScriptPanel(Ref<Nuake::File> file)
|
||||
ImGui::PopTextWrapPos();
|
||||
}
|
||||
|
||||
void EditorSelectionPanel::DrawComponent(const Nuake::Entity& entity, entt::meta_any& component)
|
||||
void EditorSelectionPanel::DrawComponent(Nuake::Entity& entity, entt::meta_any& component)
|
||||
{
|
||||
ZoneScoped;
|
||||
|
||||
@@ -571,7 +571,8 @@ void EditorSelectionPanel::DrawComponent(const Nuake::Entity& entity, entt::meta
|
||||
|
||||
if(removed)
|
||||
{
|
||||
// entity.RemoveComponent<component>();
|
||||
auto componentType = component.type();
|
||||
entity.RemoveComponent(componentType);
|
||||
ImGui::PopStyleVar();
|
||||
delete boldFont;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user