Files
integration/Source/Integration/LuprexViewportClient.h

33 lines
891 B
C
Raw Normal View History

2026-04-19 03:01:23 -04:00
////////////////////////////////////////////////////////////
//
// LuprexViewportClient.h
//
// Custom game viewport client. Implements a project-wide
// click-to-focus rule: when a left-mouse-button click is
// not handled by any widget and bubbles up to the viewport,
// we hit-test under the cursor and focus the nearest
// focusable ancestor of whatever was hit.
//
////////////////////////////////////////////////////////////
#pragma once
#include "CoreMinimal.h"
#include "Engine/GameViewportClient.h"
2026-04-22 23:32:50 -04:00
#include "Layout/WidgetPath.h"
2026-04-19 03:01:23 -04:00
#include "LuprexViewportClient.generated.h"
UCLASS()
class INTEGRATION_API UlxViewportClient : public UGameViewportClient
{
GENERATED_BODY()
public:
UlxViewportClient(const FObjectInitializer &ObjectInitializer);
virtual bool InputKey(const FInputKeyEventArgs &EventArgs) override;
2026-04-22 22:52:04 -04:00
private:
bool TryBringToFront(const FWidgetPath &Path);
2026-04-19 03:01:23 -04:00
};