Fixed a bug where bsp wouldnt get serialized properly + displaying brush in darker in scene hierarchy

This commit is contained in:
Antoine Pilote
2024-09-01 23:50:00 -04:00
parent b7ee13c0eb
commit 636736f567
2 changed files with 8 additions and 1 deletions

View File

@@ -55,6 +55,7 @@
#include "../Commands/Commands/Commands.h"
#include <src/Resource/ModelLoader.h>
#include "../ScriptingContext/ScriptingContext.h"
#include <src/Scene/Components/BSPBrushComponent.h>
namespace Nuake {
@@ -746,6 +747,10 @@ namespace Nuake {
{
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0, 255, 0, 255));
}
else if (e.HasComponent<BSPBrushComponent>())
{
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 255, 255, 120));
}
if (!m_IsRenaming && m_ShouldUnfoldEntityTree && Selection.Type == EditorSelectionType::Entity && e.GetScene()->EntityIsParent(Selection.Entity, e))
{
@@ -775,7 +780,7 @@ namespace Nuake {
}
bool isDragging = false;
if (nameComponent.IsPrefab && e.HasComponent<PrefabComponent>())
if (nameComponent.IsPrefab && e.HasComponent<PrefabComponent>() || e.HasComponent<BSPBrushComponent>())
{
ImGui::PopStyleColor();
}

View File

@@ -55,6 +55,7 @@ namespace Nuake {
SERIALIZE_VAL(TargetName);
j["IsSolid"] = IsSolid;
SERIALIZE_VAL(IsTrigger);
SERIALIZE_VAL(IsFunc);
END_SERIALIZE();
}
@@ -84,6 +85,7 @@ namespace Nuake {
DESERIALIZE_VAL(target);
DESERIALIZE_VAL(TargetName);
DESERIALIZE_VAL(IsFunc);
DESERIALIZE_VAL(IsTrigger);
return true;
}