From 14749e50bb8ea4b1a2bec16bf88feb61ecdc0b82 Mon Sep 17 00:00:00 2001 From: benui Date: Tue, 1 Mar 2022 10:46:21 -0800 Subject: [PATCH] Fixed warnings from Unreal 5.0 Preview 1 --- ImGui.uplugin | 2 +- Source/ImGui/Private/ImGuiInputHandlerFactory.cpp | 2 +- Source/ImGui/Private/ImGuiInputHandlerFactory.h | 2 +- Source/ImGui/Private/ImGuiModuleSettings.cpp | 2 +- Source/ImGui/Private/ImGuiModuleSettings.h | 12 ++++++------ Source/ImGui/Private/Widgets/SImGuiWidget.cpp | 2 +- Source/ImGui/Private/Widgets/SImGuiWidget.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ImGui.uplugin b/ImGui.uplugin index f5776ac..588f211 100644 --- a/ImGui.uplugin +++ b/ImGui.uplugin @@ -16,7 +16,7 @@ "Modules": [ { "Name": "ImGui", - "Type": "Developer", + "Type": "DeveloperTool", "LoadingPhase": "PreDefault" } ] diff --git a/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp b/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp index 90f6b10..d5b3ccb 100644 --- a/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp +++ b/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp @@ -9,7 +9,7 @@ #include -UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex) +UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FSoftClassPath& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex) { UClass* HandlerClass = nullptr; if (HandlerClassReference.IsValid()) diff --git a/Source/ImGui/Private/ImGuiInputHandlerFactory.h b/Source/ImGui/Private/ImGuiInputHandlerFactory.h index c1a3e09..e297452 100644 --- a/Source/ImGui/Private/ImGuiInputHandlerFactory.h +++ b/Source/ImGui/Private/ImGuiInputHandlerFactory.h @@ -13,7 +13,7 @@ class FImGuiInputHandlerFactory { public: - static UImGuiInputHandler* NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex); + static UImGuiInputHandler* NewHandler(const FSoftClassPath& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex); static void ReleaseHandler(UImGuiInputHandler* Handler); }; diff --git a/Source/ImGui/Private/ImGuiModuleSettings.cpp b/Source/ImGui/Private/ImGuiModuleSettings.cpp index 2c78705..0df7fa8 100644 --- a/Source/ImGui/Private/ImGuiModuleSettings.cpp +++ b/Source/ImGui/Private/ImGuiModuleSettings.cpp @@ -128,7 +128,7 @@ void FImGuiModuleSettings::UpdateDPIScaleInfo() } } -void FImGuiModuleSettings::SetImGuiInputHandlerClass(const FStringClassReference& ClassReference) +void FImGuiModuleSettings::SetImGuiInputHandlerClass(const FSoftClassPath& ClassReference) { if (ImGuiInputHandlerClass != ClassReference) { diff --git a/Source/ImGui/Private/ImGuiModuleSettings.h b/Source/ImGui/Private/ImGuiModuleSettings.h index 2b31a50..e685b2e 100644 --- a/Source/ImGui/Private/ImGuiModuleSettings.h +++ b/Source/ImGui/Private/ImGuiModuleSettings.h @@ -10,7 +10,7 @@ #include #include -// We use FStringClassReference, which is supported by older and newer engine versions. Starting from 4.18, it is +// We use FSoftClassPath, which is supported by older and newer engine versions. Starting from 4.18, it is // a typedef of FSoftClassPath, which is also recognized by UHT. #if ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF #include @@ -176,7 +176,7 @@ protected: // Path to own implementation of ImGui Input Handler allowing to customize handling of keyboard and gamepad input. // If not set then default handler is used. UPROPERTY(EditAnywhere, config, Category = "Extensions", meta = (MetaClass = "ImGuiInputHandler")) - FStringClassReference ImGuiInputHandlerClass; + FSoftClassPath ImGuiInputHandlerClass; // Whether ImGui should share keyboard input with game. // This defines initial behaviour which can be later changed using 'ImGui.ToggleKeyboardInputSharing' command or @@ -236,7 +236,7 @@ public: // Generic delegate used to notify changes of boolean properties. DECLARE_MULTICAST_DELEGATE_OneParam(FBoolChangeDelegate, bool); - DECLARE_MULTICAST_DELEGATE_OneParam(FStringClassReferenceChangeDelegate, const FStringClassReference&); + DECLARE_MULTICAST_DELEGATE_OneParam(FStringClassReferenceChangeDelegate, const FSoftClassPath&); DECLARE_MULTICAST_DELEGATE_OneParam(FImGuiCanvasSizeInfoChangeDelegate, const FImGuiCanvasSizeInfo&); DECLARE_MULTICAST_DELEGATE_OneParam(FImGuiDPIScaleInfoChangeDelegate, const FImGuiDPIScaleInfo&); @@ -253,7 +253,7 @@ public: // event that are defined depending on needs. // Get the path to custom implementation of ImGui Input Handler. - const FStringClassReference& GetImGuiInputHandlerClass() const { return ImGuiInputHandlerClass; } + const FSoftClassPath& GetImGuiInputHandlerClass() const { return ImGuiInputHandlerClass; } // Get the software cursor configuration. bool UseSoftwareCursor() const { return bUseSoftwareCursor; } @@ -285,7 +285,7 @@ private: void UpdateSettings(); void UpdateDPIScaleInfo(); - void SetImGuiInputHandlerClass(const FStringClassReference& ClassReference); + void SetImGuiInputHandlerClass(const FSoftClassPath& ClassReference); void SetShareKeyboardInput(bool bShare); void SetShareGamepadInput(bool bShare); void SetShareMouseInput(bool bShare); @@ -301,7 +301,7 @@ private: FImGuiModuleProperties& Properties; FImGuiModuleCommands& Commands; - FStringClassReference ImGuiInputHandlerClass; + FSoftClassPath ImGuiInputHandlerClass; FImGuiKeyInfo ToggleInputKey; FImGuiCanvasSizeInfo CanvasSize; FImGuiDPIScaleInfo DPIScale; diff --git a/Source/ImGui/Private/Widgets/SImGuiWidget.cpp b/Source/ImGui/Private/Widgets/SImGuiWidget.cpp index 941fcd2..1fba37f 100644 --- a/Source/ImGui/Private/Widgets/SImGuiWidget.cpp +++ b/Source/ImGui/Private/Widgets/SImGuiWidget.cpp @@ -275,7 +275,7 @@ FReply SImGuiWidget::OnTouchEnded(const FGeometry& MyGeometry, const FPointerEve return InputHandler->OnTouchEnded(TransformScreenPointToImGui(MyGeometry, TouchEvent.GetScreenSpacePosition()), TouchEvent); } -void SImGuiWidget::CreateInputHandler(const FStringClassReference& HandlerClassReference) +void SImGuiWidget::CreateInputHandler(const FSoftClassPath& HandlerClassReference) { ReleaseInputHandler(); diff --git a/Source/ImGui/Private/Widgets/SImGuiWidget.h b/Source/ImGui/Private/Widgets/SImGuiWidget.h index f98abbd..7c26aee 100644 --- a/Source/ImGui/Private/Widgets/SImGuiWidget.h +++ b/Source/ImGui/Private/Widgets/SImGuiWidget.h @@ -84,7 +84,7 @@ public: private: - void CreateInputHandler(const FStringClassReference& HandlerClassReference); + void CreateInputHandler(const FSoftClassPath& HandlerClassReference); void ReleaseInputHandler(); void RegisterImGuiSettingsDelegates();