aboutsummaryrefslogtreecommitdiff
path: root/source/30-game/Material.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-03 22:58:28 -0700
committerrtk0c <[email protected]>2022-06-03 22:58:28 -0700
commit8510a85f79f706b93982b4e398b187b5f77081dd (patch)
tree996c27f54f748d940f58454f7ef1e1570d1a31d5 /source/30-game/Material.cpp
parentbd07ae3f4e1bcdedc3e373460671ca9713a03de5 (diff)
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.
Diffstat (limited to 'source/30-game/Material.cpp')
-rw-r--r--source/30-game/Material.cpp10
1 files changed, 6 insertions, 4 deletions
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 <Metadata.hpp>
+#include <RapidJsonHelper.hpp>
+#include <ScopeGuard.hpp>
+#include <Utils.hpp>
#include <imgui.h>
#include <rapidjson/document.h>
@@ -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<IresShader* const*>(payload->Data);
mInstance->SetShader(shader->GetInstance());
}