Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/ImGui/Private/ImGuiImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
// For convenience and easy access to the ImGui source code, we build it as part of this module.
// We don't need to define IMGUI_API manually because it is already done for this module.

// UE 5.1 stopped defining PLATFORM_XBOXONE, so be safe if not defined
#if !defined(PLATFORM_XBOXONE)
#define PLATFORM_XBOXONE 0
#endif

#if PLATFORM_XBOXONE
// Disable Win32 functions used in ImGui and not supported on XBox.
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
Expand Down
2 changes: 1 addition & 1 deletion Source/ImGui/Private/ImGuiModuleSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class UImGuiSettings : public UObject

// 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"))
UPROPERTY(EditAnywhere, config, Category = "Extensions", meta = (MetaClass = "/Script/ImGui.ImGuiInputHandler"))
FSoftClassPath ImGuiInputHandlerClass;

// Whether ImGui should share keyboard input with game.
Expand Down
4 changes: 3 additions & 1 deletion Source/ImGui/Private/Widgets/SImGuiCanvasControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "VersionCompatibility.h"

#include "Math/Vector2D.h"

#include <Rendering/DrawElements.h>
#include <SlateOptMacros.h>

Expand Down Expand Up @@ -176,7 +178,7 @@ FReply SImGuiCanvasControl::OnDragOver(const FGeometry& MyGeometry, const FDragD
if (Operation.IsValid())
{
const FSlateRenderTransform ScreenToWidget = MyGeometry.GetAccumulatedRenderTransform().Inverse();
const FVector2D DragDelta = ScreenToWidget.TransformVector(DragDropEvent.GetScreenSpacePosition() - Operation->StartPosition);
const FVector2D DragDelta = static_cast<FVector2D>(ScreenToWidget.TransformVector(DragDropEvent.GetScreenSpacePosition() - Operation->StartPosition));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FVector2D() is probably a bit clearer, and functionally equivalent to this.


if (Operation->DragType == EDragType::Content)
{
Expand Down