mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Removed dependency on headers included in the PCH and fixed any non-unity issues.
This commit is contained in:
parent
bbd2c01071
commit
04e6f9d844
@ -8,6 +8,7 @@ Change History
|
|||||||
Version: 1.20 (2020/06)
|
Version: 1.20 (2020/06)
|
||||||
Transition to IWYU and maintenence:
|
Transition to IWYU and maintenence:
|
||||||
- Replaced includes of monolithic headers.
|
- Replaced includes of monolithic headers.
|
||||||
|
- Removed dependency on core, engine and ImGui module headers includes in the PCH.
|
||||||
|
|
||||||
Version: 1.19 (2020/03-06)
|
Version: 1.19 (2020/03-06)
|
||||||
- Integrated fix for issue with ImGui popup/modal windows not being able to be closed in transparent mouse input mode.
|
- Integrated fix for issue with ImGui popup/modal windows not being able to be closed in transparent mouse input mode.
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "ImGuiModuleSettings.h"
|
#include "ImGuiModuleSettings.h"
|
||||||
|
|
||||||
#include <ISettingsModule.h>
|
#include <ISettingsModule.h>
|
||||||
|
#include <Modules/ModuleManager.h>
|
||||||
|
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "ImGuiEditor"
|
#define LOCTEXT_NAMESPACE "ImGuiEditor"
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
|
|
||||||
|
#include <Delegates/IDelegateInstance.h>
|
||||||
|
|
||||||
|
|
||||||
// Registers module's settings in editor (due to a small size of this code we don't use a separate editor module).
|
// Registers module's settings in editor (due to a small size of this code we don't use a separate editor module).
|
||||||
class FImGuiEditor
|
class FImGuiEditor
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
#include "ImGuiInteroperability.h"
|
#include "ImGuiInteroperability.h"
|
||||||
#include "Utilities/Arrays.h"
|
#include "Utilities/Arrays.h"
|
||||||
|
|
||||||
#include <Runtime/Launch/Resources/Version.h>
|
#include <GenericPlatform/GenericPlatformFile.h>
|
||||||
|
#include <Misc/Paths.h>
|
||||||
|
|
||||||
|
|
||||||
static constexpr float DEFAULT_CANVAS_WIDTH = 3840.f;
|
static constexpr float DEFAULT_CANVAS_WIDTH = 3840.f;
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "ImGuiDelegates.h"
|
#include "ImGuiDelegates.h"
|
||||||
#include "ImGuiDelegatesContainer.h"
|
#include "ImGuiDelegatesContainer.h"
|
||||||
|
|
||||||
|
#include <Engine/World.h>
|
||||||
|
|
||||||
|
|
||||||
FSimpleMulticastDelegate& FImGuiDelegates::OnWorldEarlyDebug()
|
FSimpleMulticastDelegate& FImGuiDelegates::OnWorldEarlyDebug()
|
||||||
{
|
{
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
#include "ImGuiPrivatePCH.h"
|
#include "ImGuiPrivatePCH.h"
|
||||||
|
|
||||||
#include "ImGuiDemo.h"
|
#include "ImGuiDemo.h"
|
||||||
|
|
||||||
#include "ImGuiModuleProperties.h"
|
#include "ImGuiModuleProperties.h"
|
||||||
|
|
||||||
|
#include <CoreGlobals.h>
|
||||||
|
|
||||||
|
|
||||||
// Demo copied (with minor modifications) from ImGui examples. See https://github.com/ocornut/imgui.
|
// Demo copied (with minor modifications) from ImGui examples. See https://github.com/ocornut/imgui.
|
||||||
void FImGuiDemo::DrawControls(int32 ContextIndex)
|
void FImGuiDemo::DrawControls(int32 ContextIndex)
|
||||||
|
@ -15,7 +15,13 @@
|
|||||||
#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
|
#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
|
||||||
#endif // PLATFORM_XBOXONE
|
#endif // PLATFORM_XBOXONE
|
||||||
|
|
||||||
|
#if PLATFORM_WINDOWS
|
||||||
|
#include <Windows/AllowWindowsPlatformTypes.h>
|
||||||
|
#endif // PLATFORM_WINDOWS
|
||||||
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
|
#include "imgui.h"
|
||||||
|
|
||||||
// Global ImGui context pointer.
|
// Global ImGui context pointer.
|
||||||
ImGuiContext* GImGuiContextPtr = nullptr;
|
ImGuiContext* GImGuiContextPtr = nullptr;
|
||||||
// Handle to the global ImGui context pointer.
|
// Handle to the global ImGui context pointer.
|
||||||
@ -24,10 +30,6 @@ ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr;
|
|||||||
#define GImGui (*GImGuiContextPtrHandle)
|
#define GImGui (*GImGuiContextPtrHandle)
|
||||||
#endif // WITH_EDITOR
|
#endif // WITH_EDITOR
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS
|
|
||||||
#include <Windows/AllowWindowsPlatformTypes.h>
|
|
||||||
#endif // PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
#include "imgui.cpp"
|
#include "imgui.cpp"
|
||||||
#include "imgui_demo.cpp"
|
#include "imgui_demo.cpp"
|
||||||
#include "imgui_draw.cpp"
|
#include "imgui_draw.cpp"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "ImGuiModuleSettings.h"
|
#include "ImGuiModuleSettings.h"
|
||||||
|
|
||||||
#include <Engine/Console.h>
|
#include <Engine/Console.h>
|
||||||
|
#include <Framework/Application/SlateApplication.h>
|
||||||
#include <GameFramework/InputSettings.h>
|
#include <GameFramework/InputSettings.h>
|
||||||
#include <Input/Events.h>
|
#include <Input/Events.h>
|
||||||
|
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
#include "ImGuiPrivatePCH.h"
|
#include "ImGuiPrivatePCH.h"
|
||||||
|
|
||||||
#include "ImGuiInputHandlerFactory.h"
|
#include "ImGuiInputHandlerFactory.h"
|
||||||
|
|
||||||
#include "ImGuiInputHandler.h"
|
#include "ImGuiInputHandler.h"
|
||||||
|
|
||||||
|
#include <Engine/GameViewportClient.h>
|
||||||
|
|
||||||
|
|
||||||
UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex)
|
UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex)
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "ImGuiModuleSettings.h"
|
||||||
|
|
||||||
|
|
||||||
class FImGuiModuleManager;
|
class FImGuiModuleManager;
|
||||||
class UGameViewportClient;
|
class UGameViewportClient;
|
||||||
class UImGuiInputHandler;
|
class UImGuiInputHandler;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
|
|
||||||
#include <GenericPlatform/ICursor.h>
|
#include <GenericPlatform/ICursor.h>
|
||||||
|
#include <Input/Events.h>
|
||||||
|
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
#include "ImGuiPrivatePCH.h"
|
#include "ImGuiPrivatePCH.h"
|
||||||
|
|
||||||
#include "ImGuiModuleManager.h"
|
#include "ImGuiModule.h"
|
||||||
|
|
||||||
#include "ImGuiDelegatesContainer.h"
|
#include "ImGuiDelegatesContainer.h"
|
||||||
#include "ImGuiTextureHandle.h"
|
#include "ImGuiModuleManager.h"
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
#include "Utilities/WorldContext.h"
|
#include "Utilities/WorldContext.h"
|
||||||
#include "Utilities/WorldContextIndex.h"
|
#include "Utilities/WorldContextIndex.h"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "ImGuiPrivatePCH.h"
|
#include "ImGuiPrivatePCH.h"
|
||||||
|
|
||||||
#include "ImGuiModuleCommands.h"
|
#include "ImGuiModuleCommands.h"
|
||||||
|
#include "ImGuiModuleProperties.h"
|
||||||
|
|
||||||
#include "Utilities/DebugExecBindings.h"
|
#include "Utilities/DebugExecBindings.h"
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "ImGuiInteroperability.h"
|
#include "ImGuiInteroperability.h"
|
||||||
#include "Utilities/WorldContextIndex.h"
|
#include "Utilities/WorldContextIndex.h"
|
||||||
|
|
||||||
|
#include <Framework/Application/SlateApplication.h>
|
||||||
#include <Modules/ModuleManager.h>
|
#include <Modules/ModuleManager.h>
|
||||||
|
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "ImGuiModuleCommands.h"
|
#include "ImGuiModuleCommands.h"
|
||||||
#include "ImGuiModuleProperties.h"
|
#include "ImGuiModuleProperties.h"
|
||||||
|
|
||||||
|
#include <ConfigCacheIni.h>
|
||||||
|
#include <Engine/Engine.h>
|
||||||
#include <GameFramework/GameUserSettings.h>
|
#include <GameFramework/GameUserSettings.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,11 +2,21 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "VersionCompatibility.h"
|
||||||
|
|
||||||
#include <SlateTypes.h>
|
#include <SlateTypes.h>
|
||||||
#include <Curves/CurveFloat.h>
|
#include <Curves/CurveFloat.h>
|
||||||
#include <Delegates/Delegate.h>
|
#include <Delegates/Delegate.h>
|
||||||
#include <UObject/Object.h>
|
#include <UObject/Object.h>
|
||||||
|
|
||||||
|
// We use FStringClassReference, 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 <StringClassReference.h>
|
||||||
|
#else
|
||||||
|
#include <UObject/SoftObjectPath.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ImGuiModuleSettings.generated.h"
|
#include "ImGuiModuleSettings.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,13 +11,5 @@
|
|||||||
#include <CoreMinimal.h>
|
#include <CoreMinimal.h>
|
||||||
#include <Engine/Engine.h>
|
#include <Engine/Engine.h>
|
||||||
|
|
||||||
// For backward compatibility we will use FStringClassReference which in newer engine versions is a typedef for
|
|
||||||
// FSoftClassPath. Include right soft class reference header to avoid warnings in newer engine version.
|
|
||||||
#if ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF
|
|
||||||
#include <StringClassReference.h>
|
|
||||||
#else
|
|
||||||
#include <UObject/SoftObjectPath.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// You should place include statements to your module's private header files here. You only need to
|
// You should place include statements to your module's private header files here. You only need to
|
||||||
// add includes for headers that are used in most of your module's source files though.
|
// add includes for headers that are used in most of your module's source files though.
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
|
|
||||||
|
#include <Engine/Texture2D.h>
|
||||||
|
#include <Framework/Application/SlateApplication.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include <Textures/SlateShaderResource.h>
|
#include <Textures/SlateShaderResource.h>
|
||||||
|
|
||||||
|
|
||||||
|
class UTexture2D;
|
||||||
|
|
||||||
// Index type to be used as a texture handle.
|
// Index type to be used as a texture handle.
|
||||||
using TextureIndex = int32;
|
using TextureIndex = int32;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "SImGuiCanvasControl.h"
|
#include "SImGuiCanvasControl.h"
|
||||||
|
|
||||||
|
#include <Rendering/DrawElements.h>
|
||||||
#include <SlateOptMacros.h>
|
#include <SlateOptMacros.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <Engine/Console.h>
|
#include <Engine/Console.h>
|
||||||
#include <Engine/GameViewportClient.h>
|
#include <Engine/GameViewportClient.h>
|
||||||
#include <Engine/LocalPlayer.h>
|
#include <Engine/LocalPlayer.h>
|
||||||
|
#include <Framework/Application/SlateApplication.h>
|
||||||
#include <GameFramework/GameUserSettings.h>
|
#include <GameFramework/GameUserSettings.h>
|
||||||
#include <SlateOptMacros.h>
|
#include <SlateOptMacros.h>
|
||||||
#include <Widgets/SViewport.h>
|
#include <Widgets/SViewport.h>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "ImGuiModuleDebug.h"
|
#include "ImGuiModuleDebug.h"
|
||||||
#include "ImGuiModuleSettings.h"
|
#include "ImGuiModuleSettings.h"
|
||||||
|
|
||||||
|
#include <Rendering/RenderingCommon.h>
|
||||||
#include <Widgets/DeclarativeSyntaxSupport.h>
|
#include <Widgets/DeclarativeSyntaxSupport.h>
|
||||||
#include <Widgets/SCompoundWidget.h>
|
#include <Widgets/SCompoundWidget.h>
|
||||||
|
|
||||||
@ -16,6 +17,9 @@ class FImGuiModuleManager;
|
|||||||
class SImGuiCanvasControl;
|
class SImGuiCanvasControl;
|
||||||
class UImGuiInputHandler;
|
class UImGuiInputHandler;
|
||||||
|
|
||||||
|
class UGameViewportClient;
|
||||||
|
class ULocalPlayer;
|
||||||
|
|
||||||
// Slate widget for rendering ImGui output and storing Slate inputs.
|
// Slate widget for rendering ImGui output and storing Slate inputs.
|
||||||
class SImGuiWidget : public SCompoundWidget
|
class SImGuiWidget : public SCompoundWidget
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <CoreMinimal.h>
|
#include <CoreMinimal.h>
|
||||||
|
#include <Input/Reply.h>
|
||||||
#include <UObject/Object.h>
|
#include <UObject/Object.h>
|
||||||
#include <UObject/WeakObjectPtr.h>
|
#include <UObject/WeakObjectPtr.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user