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

QuartzUIBlueprintLibrary: 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/QuartzUIBlueprintLibrary.h) · integration recipe · practical guide

FQuartzUI

Public type. Compact exact-player C++ facade over the canonical shell/view/bridge contracts.

Prerequisites / integration: Configured exact-player shell, QuartzUIRuntime dependency, one frontend client. Use the QuartzUIBlueprintLibrary recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: FQuartzUI::SetIntegerValue(Player, TEXT("hud.ammo"), 30). Uses subsystem-owned shell; unregister actions at owner teardown.

Avoid: Omitting the player in split screen or ignoring false/null. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIBlueprintLibrary.h#L20)

UQuartzUIBlueprintLibrary

Public type. Beginner-facing World Context nodes that resolve one exact local player.

Prerequisites / integration: Configured exact-player shell, QuartzUIRuntime dependency, one frontend client. Use the QuartzUIBlueprintLibrary recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: FQuartzUI::SetIntegerValue(Player, TEXT("hud.ammo"), 30). Uses subsystem-owned shell; unregister actions at owner teardown.

Avoid: Omitting the player in split screen or ignoring false/null. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIBlueprintLibrary.h#L101)

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 "Kismet/BlueprintFunctionLibrary.h"
#include "QuartzUIActions.h"
#include "QuartzUIInput.h"
#include "QuartzUIProviderSet.h"

#include "QuartzUIBlueprintLibrary.generated.h"

class APlayerController;
class ULocalPlayer;
class UQuartzUISubsystem;
class UQuartzUISoundSubsystem;
class UQuartzUITypedEndpoint;
class UQuartzUIView;
class UScriptStruct;

/** Compact exact-player C++ facade over the canonical shell/view/bridge contracts. */
class QUARTZUIRUNTIME_API FQuartzUI final
{
public:
	static UQuartzUISubsystem* GetSubsystem(ULocalPlayer* LocalPlayer);
	static UQuartzUISoundSubsystem* GetSoundSubsystem(ULocalPlayer* LocalPlayer);
	static UQuartzUIView* StartShell(ULocalPlayer* LocalPlayer);
	static bool StopShell(ULocalPlayer* LocalPlayer);
	static UQuartzUIView* GetShell(ULocalPlayer* LocalPlayer);
	static bool IsReady(ULocalPlayer* LocalPlayer);
	static FQuartzUIProviderSetHandle BindProviderSet(
		ULocalPlayer* LocalPlayer,
		const UQuartzUIProviderSet* ProviderSet);
	static bool ReleaseProviderSet(
		ULocalPlayer* LocalPlayer,
		FQuartzUIProviderSetHandle Handle);

	static bool ShowScreen(
		ULocalPlayer* LocalPlayer,
		FName ScreenName,
		const FQuartzUIInputConfig& InputConfig);
	static bool ApplyInputPolicy(ULocalPlayer* LocalPlayer, const FQuartzUIInputConfig& InputConfig);

	static bool SetBoolValue(ULocalPlayer* LocalPlayer, FName StateName, bool Value);
	static bool SetIntegerValue(ULocalPlayer* LocalPlayer, FName StateName, int32 Value);
	static bool SetFloatValue(ULocalPlayer* LocalPlayer, FName StateName, float Value);
	static bool SetTextValue(ULocalPlayer* LocalPlayer, FName StateName, const FText& Value);
	static bool SetNameValue(ULocalPlayer* LocalPlayer, FName StateName, FName Value);
	/** Publishes one bounded object-JSON snapshot through the retained state channel. */
	static bool PublishJsonState(ULocalPlayer* LocalPlayer, FName StateName, const FString& PayloadJson);
	static bool PublishStruct(
		ULocalPlayer* LocalPlayer,
		FName StateName,
		const UScriptStruct* StructType,
		const void* StructValue);

	template <typename StructType>
	static bool PublishStruct(ULocalPlayer* LocalPlayer, const FName StateName, const StructType& Value)
	{
		return PublishStruct(LocalPlayer, StateName, StructType::StaticStruct(), &Value);
	}

	static bool ShowNotification(
		ULocalPlayer* LocalPlayer,
		const FText& Message,
		FName NotificationId = NAME_None);
	/** Emits one bounded object-JSON event through the existing readiness-aware FIFO. */
	static bool EmitJsonEvent(ULocalPlayer* LocalPlayer, FName EventName, const FString& PayloadJson);
	static bool EmitStructEvent(
		ULocalPlayer* LocalPlayer,
		FName EventName,
		const UScriptStruct* StructType,
		const void* StructValue);

	template <typename StructType>
	static bool EmitStructEvent(ULocalPlayer* LocalPlayer, const FName EventName, const StructType& Value)
	{
		return EmitStructEvent(LocalPlayer, EventName, StructType::StaticStruct(), &Value);
	}

	static bool SetActions(ULocalPlayer* LocalPlayer, const TArray<FQuartzUIBoundAction>& Actions);
	static bool RegisterAction(
		ULocalPlayer* LocalPlayer,
		FName ActionName,
		const FQuartzUINamedActionHandler& Handler);
	static bool RegisterNativeAction(
		ULocalPlayer* LocalPlayer,
		FName ActionName,
		const FQuartzUINativeNamedActionHandler& Handler);
	static bool UnregisterAction(ULocalPlayer* LocalPlayer, FName ActionName);
	static bool IsActionRegistered(ULocalPlayer* LocalPlayer, FName ActionName);
	static UQuartzUITypedEndpoint* BindEndpoint(
		ULocalPlayer* LocalPlayer,
		TSubclassOf<UQuartzUITypedEndpoint> EndpointClass);
	static bool UnbindEndpoint(ULocalPlayer* LocalPlayer, FName EndpointName);

	static FString GetFailure(ULocalPlayer* LocalPlayer);
	static bool Retry(ULocalPlayer* LocalPlayer);
};

/** Beginner-facing World Context nodes that resolve one exact local player. */
UCLASS()
class QUARTZUIRUNTIME_API UQuartzUIBlueprintLibrary final : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	/** Uses the supplied local controller, or the sole local player when unambiguous. */
	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject"))
	static ULocalPlayer* ResolveExactLocalPlayer(
		const UObject* WorldContextObject,
		APlayerController* PlayerController);

	/** Exact-player event hub to bind when a project owns its audio middleware. */
	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI|Sound", meta = (WorldContext = "WorldContextObject", DisplayName = "Get UI Sound Subsystem"))
	static UQuartzUISoundSubsystem* GetUISoundSubsystem(
		const UObject* WorldContextObject,
		APlayerController* PlayerController);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Start UI Shell"))
	static UQuartzUIView* StartUIShell(const UObject* WorldContextObject, APlayerController* PlayerController);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Stop UI Shell"))
	static bool StopUIShell(const UObject* WorldContextObject, APlayerController* PlayerController);

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Get UI Shell"))
	static UQuartzUIView* GetUIShell(const UObject* WorldContextObject, APlayerController* PlayerController);

	/** True while this exact player's browser owns Slate keyboard focus. */
	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject"))
	static bool IsUIKeyboardFocused(const UObject* WorldContextObject, APlayerController* PlayerController);

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Is UI Ready"))
	static bool IsUIReady(const UObject* WorldContextObject, APlayerController* PlayerController);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Providers",
		meta = (WorldContext = "WorldContextObject", DisplayName = "Bind UI Provider Set"))
	static FQuartzUIProviderSetHandle BindUIProviderSet(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		const UQuartzUIProviderSet* ProviderSet);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Providers",
		meta = (WorldContext = "WorldContextObject", DisplayName = "Release UI Provider Set"))
	static bool ReleaseUIProviderSet(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FQuartzUIProviderSetHandle Handle);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Show UI Screen"))
	static bool ShowUIScreen(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName ScreenName,
		const FQuartzUIInputConfig& InputConfig);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI", meta = (WorldContext = "WorldContextObject", DisplayName = "Apply UI Input Policy"))
	static bool ApplyUIInputPolicy(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		const FQuartzUIInputConfig& InputConfig);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Boolean"))
	static bool SetUIBoolValue(const UObject* WorldContextObject, APlayerController* PlayerController, FName StateName, bool Value);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Integer"))
	static bool SetUIIntegerValue(const UObject* WorldContextObject, APlayerController* PlayerController, FName StateName, int32 Value);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Float"))
	static bool SetUIFloatValue(const UObject* WorldContextObject, APlayerController* PlayerController, FName StateName, float Value);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Text"))
	static bool SetUITextValue(const UObject* WorldContextObject, APlayerController* PlayerController, FName StateName, const FText& Value);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Name"))
	static bool SetUINameValue(const UObject* WorldContextObject, APlayerController* PlayerController, FName StateName, FName Value);

	/** Escape hatch for Blueprint-owned object JSON. Prefer Publish UI Struct for stable contracts. */
	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", DisplayName = "Publish UI JSON State"))
	static bool PublishUIJsonState(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName StateName,
		const FString& PayloadJson);

	UFUNCTION(BlueprintCallable, CustomThunk, Category = "QuartzUI|Game UI|Values", meta = (WorldContext = "WorldContextObject", CustomStructureParam = "StructValue", DisplayName = "Publish UI Struct"))
	static bool PublishUIStruct(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName StateName,
		const int32& StructValue);
	DECLARE_FUNCTION(execPublishUIStruct);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Events", meta = (WorldContext = "WorldContextObject", DisplayName = "Show UI Notification"))
	static bool ShowUINotification(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		const FText& Message,
		FName NotificationId = NAME_None);

	/** Sends a named transient event with bounded object JSON; safe before UI readiness. */
	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Events", meta = (WorldContext = "WorldContextObject", DisplayName = "Send UI JSON Event", CPP_Default_PayloadJson = "{}"))
	static bool SendUIJsonEvent(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName EventName,
		const FString& PayloadJson);

	UFUNCTION(BlueprintCallable, CustomThunk, Category = "QuartzUI|Game UI|Events", meta = (WorldContext = "WorldContextObject", CustomStructureParam = "StructValue", DisplayName = "Send Typed UI Event"))
	static bool SendUITypedEvent(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName EventName,
		const int32& StructValue);
	DECLARE_FUNCTION(execSendUITypedEvent);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Actions", meta = (WorldContext = "WorldContextObject", DisplayName = "Set UI Actions"))
	static bool SetUIActions(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		const TArray<FQuartzUIBoundAction>& Actions);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Actions", meta = (WorldContext = "WorldContextObject", DisplayName = "Register UI Action"))
	static bool RegisterUIAction(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName ActionName,
		FQuartzUINamedActionHandler Handler);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Actions", meta = (WorldContext = "WorldContextObject", DisplayName = "Unregister UI Action"))
	static bool UnregisterUIAction(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName ActionName);

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI|Actions", meta = (WorldContext = "WorldContextObject", DisplayName = "Is UI Action Registered"))
	static bool IsUIActionRegistered(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName ActionName);

	/** Constructs one explicit Blueprint endpoint object and retains it on this player's shell. */
	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Project Endpoints",
		meta = (WorldContext = "WorldContextObject", DisplayName = "Bind Typed UI Endpoint"))
	static UQuartzUITypedEndpoint* BindUITypedEndpoint(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		TSubclassOf<UQuartzUITypedEndpoint> EndpointClass);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Project Endpoints",
		meta = (WorldContext = "WorldContextObject", DisplayName = "Unbind Typed UI Endpoint"))
	static bool UnbindUITypedEndpoint(
		const UObject* WorldContextObject,
		APlayerController* PlayerController,
		FName EndpointName);

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Game UI|Recovery", meta = (WorldContext = "WorldContextObject", DisplayName = "Get UI Failure"))
	static FString GetUIFailure(const UObject* WorldContextObject, APlayerController* PlayerController);

	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Game UI|Recovery", meta = (WorldContext = "WorldContextObject", DisplayName = "Retry UI"))
	static bool RetryUI(const UObject* WorldContextObject, APlayerController* PlayerController);
};