Quartz UI ↗
Browse docs
On this page
Private preview · 0.57.0-devView Markdown

QuartzUIInput: declaration reference

0.57.0-dev · beta source documentation. Native, Blueprint, Editor and rendering examples are source-reviewed, not executed in Unreal during this scan. See validation and limits.

Pinned source (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h) · integration recipe · practical guide

EQuartzUIInputMode

Public type. Unreal input ownership requested by the highest active interactive layer.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L13)

FQuartzUIInputConfig

Public type. CommonUI-style input ownership selected by the highest interactive web layer.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L22)

EQuartzUIInputModality

Public type. Last meaningful input source, used by web UI to choose glyphs and hover policy.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L61)

EQuartzUINavigationAction

Public type. Framework-neutral navigation actions produced by the standalone or project input adapter.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L70)

EQuartzUIInputActionPhase

Public type. Backend-neutral lifecycle for a project-defined logical UI action.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L86)

FQuartzUIInputActionEvent

Public type. One bounded action sample routed from project input code to the active web view. Wire role: payload of quartzui.input.action (event).

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: client.subscribeEvent('quartzui.input.action', value => { /* read this DTO */ }). Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L97)

FQuartzUIResolvedInputGlyph

Public type. Browser-ready presentation for one project-defined logical input action.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L119)

UQuartzUIInputGlyphProfile

Public type. Project-authored glyph configuration selected by any input backend. CommonInput, Steam Input, platform code, or game Blueprints own device detection.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L148)

FQuartzUIInputDevicePolicy

Internal type. Small framework-neutral input validation policy.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIInput recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Use FQuartzUIInputConfig with ShowScreen; publish an input glyph profile. Config/event copies; project owns profile assets.

Avoid: Browser vendor detection or using display glyphs as input authority. This named helper is runtime-owned; inspect/use it through the owner above rather than constructing it in gameplay.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIInput.h#L165)

Complete header

Source snapshot, not an additional example. Unreal annotations distinguish exposed Blueprint nodes from native-only/private methods.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "Engine/EngineBaseTypes.h"

#include "QuartzUIInput.generated.h"

enum class EHardwareDevicePrimaryType : uint8;

/** Unreal input ownership requested by the highest active interactive layer. */
UENUM(BlueprintType, meta = (QuartzUITypeName = "QuartzUIInputMode"))
enum class EQuartzUIInputMode : uint8
{
	GameOnly UMETA(QuartzUIValue = "game-only"),
	GameAndUI UMETA(QuartzUIValue = "game-and-ui"),
	UIOnly UMETA(QuartzUIValue = "ui-only")
};

/** CommonUI-style input ownership selected by the highest interactive web layer. */
USTRUCT(BlueprintType)
struct QUARTZUIRUNTIME_API FQuartzUIInputConfig
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	EQuartzUIInputMode InputMode = EQuartzUIInputMode::GameAndUI;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	EMouseCaptureMode MouseCaptureMode = EMouseCaptureMode::CaptureDuringMouseDown;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	EMouseLockMode MouseLockMode = EMouseLockMode::DoNotLock;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	bool bHideCursorDuringViewportCapture = false;

	/** Allows a mixed GameAndUI layer to suppress movement without blocking all gameplay input. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	bool bIgnoreMoveInput = false;

	/** Allows a mixed GameAndUI layer to suppress camera look without blocking all gameplay input. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input")
	bool bIgnoreLookInput = false;

	bool IsValid() const;

	bool operator==(const FQuartzUIInputConfig& Other) const
	{
		return InputMode == Other.InputMode
			&& MouseCaptureMode == Other.MouseCaptureMode
			&& MouseLockMode == Other.MouseLockMode
			&& bHideCursorDuringViewportCapture == Other.bHideCursorDuringViewportCapture
			&& bIgnoreMoveInput == Other.bIgnoreMoveInput
			&& bIgnoreLookInput == Other.bIgnoreLookInput;
	}
};

/** Last meaningful input source, used by web UI to choose glyphs and hover policy. */
UENUM(BlueprintType, meta = (QuartzUITypeName = "InputModality"))
enum class EQuartzUIInputModality : uint8
{
	MouseAndKeyboard UMETA(QuartzUIValue = "mouse-keyboard"),
	Gamepad UMETA(QuartzUIValue = "gamepad"),
	Touch UMETA(QuartzUIValue = "touch")
};

/** Framework-neutral navigation actions produced by the standalone or project input adapter. */
UENUM(BlueprintType, meta = (QuartzUITypeName = "NavigationAction"))
enum class EQuartzUINavigationAction : uint8
{
	Next UMETA(QuartzUIValue = "next"),
	Previous UMETA(QuartzUIValue = "previous"),
	Up UMETA(QuartzUIValue = "up"),
	Down UMETA(QuartzUIValue = "down"),
	Left UMETA(QuartzUIValue = "left"),
	Right UMETA(QuartzUIValue = "right"),
	Confirm UMETA(QuartzUIValue = "confirm"),
	Cancel UMETA(QuartzUIValue = "cancel"),
	TabLeft UMETA(QuartzUIValue = "tab-left"),
	TabRight UMETA(QuartzUIValue = "tab-right")
};

/** Backend-neutral lifecycle for a project-defined logical UI action. */
UENUM(BlueprintType, meta = (QuartzUITypeName = "QuartzUIInputActionPhase"))
enum class EQuartzUIInputActionPhase : uint8
{
	Started UMETA(QuartzUIValue = "started"),
	Ongoing UMETA(QuartzUIValue = "ongoing"),
	Triggered UMETA(QuartzUIValue = "triggered"),
	Completed UMETA(QuartzUIValue = "completed"),
	Canceled UMETA(QuartzUIValue = "canceled")
};

/** One bounded action sample routed from project input code to the active web view. */
USTRUCT(BlueprintType, meta = (QuartzUITypeName = "QuartzUIInputActionEvent"))
struct QUARTZUIRUNTIME_API FQuartzUIInputActionEvent
{
	GENERATED_BODY()

	/** Open logical name, for example inventory.drop or ui.accept-invite. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "action"))
	FName ActionName;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "phase"))
	EQuartzUIInputActionPhase Phase = EQuartzUIInputActionPhase::Triggered;

	/** Normalized scalar supplied by the adapter, bounded to -1..1. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "value"))
	float Value = 1.0f;

	/** Time since Started, bounded to 0..60 seconds for hold presentation. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "elapsedSeconds"))
	float ElapsedSeconds = 0.0f;
};

/** Browser-ready presentation for one project-defined logical input action. */
USTRUCT(BlueprintType, meta = (QuartzUITypeName = "QuartzUIInputGlyph"))
struct QUARTZUIRUNTIME_API FQuartzUIResolvedInputGlyph
{
	GENERATED_BODY()

	/** Open logical action name, for example ui.confirm or inventory.drop. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIIgnore))
	FName ActionName;

	/** Localizable text fallback and accessible name. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "label"))
	FText Label;

	/** Optional same-origin compiled web asset below Resources/Web/assets/. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Input", meta = (QuartzUIName = "resource"))
	FString ResourcePath;

	bool operator==(const FQuartzUIResolvedInputGlyph& Other) const
	{
		return ActionName == Other.ActionName
			&& Label.EqualTo(Other.Label)
			&& ResourcePath == Other.ResourcePath;
	}
};

/**
 * Project-authored glyph configuration selected by any input backend.
 * CommonInput, Steam Input, platform code, or game Blueprints own device detection.
 */
UCLASS(BlueprintType)
class QUARTZUIRUNTIME_API UQuartzUIInputGlyphProfile : public UDataAsset
{
	GENERATED_BODY()

public:
	virtual bool NeedsLoadForServer() const override { return false; }

	/** Open stable identifier; device vendors are not enumerated by QuartzUI. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Input")
	FName ProfileId = TEXT("generic");

	/** Any project-defined action may have a label, a web asset, or both. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Input")
	TArray<FQuartzUIResolvedInputGlyph> Glyphs;
};

/** Small framework-neutral input validation policy. */
class QUARTZUIRUNTIME_API FQuartzUIInputDevicePolicy final
{
public:
	/** Uses UE's declared primary hardware type; unspecified devices fail closed. */
	static bool IsGamepadHardware(EHardwareDevicePrimaryType PrimaryType);
	static bool IsValidGlyphProfileId(FName ProfileId);
	static bool IsValidResolvedGlyph(const FQuartzUIResolvedInputGlyph& Glyph);
	static bool IsValidResolvedGlyphSet(
		FName ProfileId,
		const TArray<FQuartzUIResolvedInputGlyph>& Glyphs);
	static bool TrySerializeInputActionEvent(
		const FQuartzUIInputActionEvent& Event,
		FString& OutPayloadJson);
};