2017-03-18 11:33:14 +00:00
|
|
|
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
|
|
|
|
#include "ImGuiPrivatePCH.h"
|
|
|
|
|
|
|
|
// We build ImGui source code as part of this module. This is for convenience (no need to manually build libraries for
|
|
|
|
// different target platforms) but it also exposes the whole ImGui source for inspection, which can be pretty handy.
|
|
|
|
// Source files are included from Third Party directory, so we can wrap them in required by Unreal Build System headers
|
|
|
|
// without modifications in ImGui source code.
|
|
|
|
//
|
|
|
|
// We don't need to define IMGUI_API manually because it is already done for this module.
|
|
|
|
|
2018-02-02 23:14:17 +00:00
|
|
|
#if PLATFORM_XBOXONE
|
|
|
|
// Disable Win32 functions used in ImGui and not supported on XBox.
|
|
|
|
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
|
|
|
|
#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
|
|
|
|
#endif // PLATFORM_XBOXONE
|
|
|
|
|
2018-08-10 22:53:03 +00:00
|
|
|
#if WITH_EDITOR
|
|
|
|
// Global ImGui context pointer.
|
|
|
|
ImGuiContext* GImGuiContextPtr = nullptr;
|
|
|
|
// Handle to the global ImGui context pointer.
|
|
|
|
ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr;
|
|
|
|
// Get the global ImGui context pointer (GImGui) indirectly to allow redirections in obsolete modules.
|
|
|
|
#define GImGui (*GImGuiContextPtrHandle)
|
|
|
|
#endif // WITH_EDITOR
|
|
|
|
|
2017-03-18 11:33:14 +00:00
|
|
|
#if PLATFORM_WINDOWS
|
2019-07-27 17:06:29 +00:00
|
|
|
#include <Windows/AllowWindowsPlatformTypes.h>
|
2017-03-18 11:33:14 +00:00
|
|
|
#endif // PLATFORM_WINDOWS
|
|
|
|
|
|
|
|
#include "imgui.cpp"
|
|
|
|
#include "imgui_demo.cpp"
|
|
|
|
#include "imgui_draw.cpp"
|
2018-09-12 18:21:36 +00:00
|
|
|
#include "imgui_widgets.cpp"
|
2017-03-18 11:33:14 +00:00
|
|
|
|
|
|
|
#if PLATFORM_WINDOWS
|
2019-07-27 17:06:29 +00:00
|
|
|
#include <Windows/HideWindowsPlatformTypes.h>
|
2017-03-18 11:33:14 +00:00
|
|
|
#endif // PLATFORM_WINDOWS
|
2017-08-28 19:29:07 +00:00
|
|
|
|
2018-04-21 20:40:05 +00:00
|
|
|
#include "ImGuiInteroperability.h"
|
|
|
|
|
2019-03-13 20:40:13 +00:00
|
|
|
|
2017-09-27 20:16:54 +00:00
|
|
|
namespace ImGuiImplementation
|
2017-08-28 19:29:07 +00:00
|
|
|
{
|
2018-08-10 22:53:03 +00:00
|
|
|
#if WITH_EDITOR
|
|
|
|
ImGuiContext** GetImGuiContextHandle()
|
|
|
|
{
|
|
|
|
return GImGuiContextPtrHandle;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetImGuiContextHandle(ImGuiContext** Handle)
|
|
|
|
{
|
|
|
|
GImGuiContextPtrHandle = Handle;
|
|
|
|
}
|
|
|
|
#endif // WITH_EDITOR
|
2019-07-27 17:06:29 +00:00
|
|
|
}
|