2017-03-18 11:33:14 +00:00
|
|
|
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
|
2020-06-25 09:52:46 +00:00
|
|
|
#include "ImGuiImplementation.h"
|
2017-03-18 11:33:14 +00:00
|
|
|
|
2020-06-25 09:52:46 +00:00
|
|
|
#include <CoreMinimal.h>
|
|
|
|
|
|
|
|
// For convenience and easy access to the ImGui source code, we build it as part of this module.
|
2017-03-18 11:33:14 +00:00
|
|
|
// 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
|
|
|
|
|
2020-06-14 20:50:26 +00:00
|
|
|
#if PLATFORM_WINDOWS
|
|
|
|
#include <Windows/AllowWindowsPlatformTypes.h>
|
|
|
|
#endif // PLATFORM_WINDOWS
|
|
|
|
|
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
|
|
|
#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
|
|
|
}
|