43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
// Project Lab - NHTV Igad
|
|
|
|
#pragma once
|
|
|
|
#include "Blueprint/UserWidget.h"
|
|
#include "AbilityButton.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class UNREALPROJECT_API UAbilityButton : public UUserWidget
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
void NativeConstruct() override;
|
|
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "Button")
|
|
void SetupButton(class UAbilityInfo* info, bool enabled);
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "Button")
|
|
void SetCooldown(float cooldown);
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "Button")
|
|
void SetToggled(bool toggled);
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "Button")
|
|
void SetIndex(int32 index, bool alt);
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "Button")
|
|
void SetAbilityAvailable(bool available);
|
|
|
|
class UAbilityInfo* GetAbility();
|
|
|
|
void InitButton(class UAbilityInfo* info, int32 index, bool alt);
|
|
bool IsAssigned() const;
|
|
void UpdateState(class AAbilityState* state, class ANetworkCharacter* character);
|
|
void SetButtonEnabled(bool enabled);
|
|
void SetGlobalEnable(bool enabled);
|
|
private:
|
|
int32 m_index;
|
|
bool m_enabled;
|
|
bool m_globalEnable;
|
|
class UAbilityInfo* m_abilityInfo;
|
|
};
|