From 606a5b82991c55d70eced5b6397ebac72ceab666 Mon Sep 17 00:00:00 2001 From: UE4SS Date: Mon, 16 Oct 2023 06:03:53 +0200 Subject: [PATCH] Made enum values use their display name when appropriate in the live view tab --- UE4SS/src/GUI/LiveView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UE4SS/src/GUI/LiveView.cpp b/UE4SS/src/GUI/LiveView.cpp index e5952f466..ab80ba686 100644 --- a/UE4SS/src/GUI/LiveView.cpp +++ b/UE4SS/src/GUI/LiveView.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1385,6 +1386,13 @@ namespace RC::GUI } render_property_value_context_menu(tree_node_id); } + else if (auto enum_property = CastField(property); enum_property) + { + auto value_raw = std::bit_cast(container_ptr); + auto value_as_string = Unreal::UKismetNodeHelperLibrary::GetEnumeratorUserFriendlyName(enum_property->GetEnum(), *value_raw); + ImGui::SameLine(); + ImGui::Text("%S", value_as_string.c_str()); + } else { ImGui::SameLine();