37 lines
908 B
C++
37 lines
908 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UI/EleriBaseWidget.h"
|
|
#include "InteractionWidget.generated.h"
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDisplayInteractionMenu, bool, bActive);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS(BlueprintType)
|
|
class PROJECTELERI_API UInteractionWidget : public UEleriBaseWidget
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
FOnDisplayInteractionMenu OnDisplayInteractionMenu;
|
|
|
|
void PushInteractableObject(UObject* Object, const FText& Text);
|
|
void PopInteractableObject(UObject* Object);
|
|
UObject* SelectInteractableObject(bool bNext);
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
void K2_RefreshObjectDisplay(const TArray<UObject*>& ObjectArray, int32 SelectedIndex);
|
|
|
|
private:
|
|
UPROPERTY(Transient)
|
|
TArray<UObject*> ObjectTextMap;
|
|
|
|
UPROPERTY()
|
|
int32 CurrentlySelectedIndex = -1;
|
|
};
|