From 8510a85f79f706b93982b4e398b187b5f77081dd Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 22:58:28 -0700 Subject: Changeset: 61 [BUGGED] Move object kind enums to use generated ToString and FromStrong The old mechanism rely on a specific prefix to Ires and GameObject string representations, but the generator currently leaves the enum value. Therefore all editor (e.g. drag & drop) and IO (e.g. ires loading) mechanisms are broken. --- source/30-game/Material.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/30-game/Material.cpp') diff --git a/source/30-game/Material.cpp b/source/30-game/Material.cpp index e648970..9b0c42d 100644 --- a/source/30-game/Material.cpp +++ b/source/30-game/Material.cpp @@ -3,9 +3,11 @@ #include "AppConfig.hpp" #include "EditorCore.hpp" #include "EditorUtils.hpp" -#include "RapidJsonHelper.hpp" -#include "ScopeGuard.hpp" -#include "Utils.hpp" + +#include +#include +#include +#include #include #include @@ -349,7 +351,7 @@ void IresMaterial::ShowEditor(IEditor& editor) { IresObject::ShowReferenceNull(editor); } if (ImGui::BeginDragDropTarget()) { - if (auto payload = ImGui::AcceptDragDropPayload(ToString(KD_Shader).data())) { + if (auto payload = ImGui::AcceptDragDropPayload(Metadata::EnumToString(KD_Shader).data())) { auto shader = *static_cast(payload->Data); mInstance->SetShader(shader->GetInstance()); } -- cgit v1.2.3-70-g09d2