Files
UnrealEngine/Engine/Source/Runtime/UMG/Public/Components/MouseHoverComponent.h
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

29 lines
786 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Extensions/UIComponent.h"
#include "UObject/ObjectMacros.h"
#include "MouseHoverComponent.generated.h"
/** This is a class for a Component that exposes the mouse hover state of its Owner widget. */
UCLASS(MinimalAPI)
class UMouseHoverComponent : public UUIComponent
{
GENERATED_BODY()
public:
bool GetIsHovered() const { return bIsHovered; }
void OnMouseHoverChanged(bool InbIsHovered);
private:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Getter = "GetIsHovered", FieldNotify, Category = "Mouse Hover State", meta = (AllowPrivateAccess))
bool bIsHovered = false;
virtual TSharedRef<SWidget> RebuildWidgetWithContent(const TSharedRef<SWidget> OwnerContent) override;
};