Space Plunder
Loading...
Searching...
No Matches
InteractionTypeWidget.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "InteractionTypeWidget.generated.h"
8
12UCLASS()
13class INTERACTION_API UInteractionTypeWidget : public UUserWidget
14{
15
16 GENERATED_BODY()
17public:
18
19 virtual bool Initialize() override;
20
21 virtual void NativeConstruct() override;
22
23
24
25 UFUNCTION(BlueprintCallable, Category="Interaction")
26 void SetInteractionText(const FString& Key = "[E]", const FString& InteractionType = "Open", const FString& Name = "Door") const;
27 UFUNCTION(BlueprintCallable, Category="Interaction")
28 void ClearInteractionText() const;
29
30 UFUNCTION(BlueprintCallable, Category="Interaction")
31 void SetSelected(const bool bValue);
32 UFUNCTION(BlueprintImplementableEvent, Category="Interaction")
33 void OnSelected(const bool bValue);
34
35 UFUNCTION(BlueprintCallable, Category="Interaction")
36 void SetHasProgress(const bool bValue) const;
37 UFUNCTION(BlueprintCallable, Category="Interaction")
38 void SetAvailable(const bool bValue);
39
40 virtual void StartSelection(const float Time);
41 virtual void StopSelection();
42 UFUNCTION(BlueprintImplementableEvent, Category="Interaction")
43 void OnStartSelection(const float Time);
44 UFUNCTION(BlueprintImplementableEvent, Category="Interaction")
45 void OnStopSelection();
46
47protected:
48
49 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Interaction")
50 FName InteractInputName = "Interact";
51 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Interaction")
52 bool bIsSelected = false;
53
54 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget), Category="Interaction")
55 class UButton* ButtonOverlay;
56
57 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget), Category="Interaction")
58 class UButtonPromptWidget* ButtonPromptWidget = nullptr;
59 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta=(BindWidget), Category="Interaction")
60 class UTextBlock* ContextTextBlock;
61
62 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Button Prompt")
63 bool bAvailable = true;
64
65 UFUNCTION()
66 void OnHovered();
67 UFUNCTION()
68 void OnUnhovered();
69 UFUNCTION()
70 void OnClicked();
71
72};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition Interaction.Build.cs:6
User widget representing a button prompt for It provides functionality for displaying a button icon,...
Definition ButtonPromptWidget.h:32
Definition InteractionTypeWidget.h:14