update non-module GasaGen
This commit is contained in:
@ -70,7 +70,7 @@ void AGasaCharacter::ApplyEffectToSelf(TSubclassOf<UGameplayEffect> GE, float Le
|
||||
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
|
||||
ensure(ASC);
|
||||
ensure(GE);
|
||||
FGameplayEffectContextHandle Context = ASC->MakeEffectContext();
|
||||
FGameplayEffectContextHandle Context = ASC->MakeEffectContext(); Context.AddSourceObject(this);
|
||||
FGameplayEffectSpecHandle Spec = ASC->MakeOutgoingSpec(GE, Level, Context );
|
||||
ASC->ApplyGameplayEffectSpecToTarget( * Spec.Data, ASC );
|
||||
}
|
||||
|
@ -4,9 +4,11 @@
|
||||
|
||||
#include "GasaCommon.generated.h"
|
||||
|
||||
#ifndef global
|
||||
#define global
|
||||
#define internal static
|
||||
#define local_persist static
|
||||
#endif
|
||||
|
||||
#ifndef ccast
|
||||
#define ccast( Type, Value ) ( *const_cast<(Type)*>( &( Value ) ) )
|
||||
@ -15,7 +17,9 @@
|
||||
#define scast( Type, Value ) static_cast<Type>( Value )
|
||||
#endif
|
||||
|
||||
#ifndef bit
|
||||
#define bit(position) (1 << position)
|
||||
#endif
|
||||
|
||||
#pragma region Math
|
||||
#define m_pow2( value ) (value * value)
|
||||
@ -45,8 +49,10 @@ class UCameraComponent;
|
||||
class UGameplayEffect;
|
||||
class UInputAction;
|
||||
class UInputMappingContext;
|
||||
class UNamedSlot;
|
||||
class USphereComponent;
|
||||
class USpringArmComponent;
|
||||
class UTextBlock;
|
||||
class UTexture2D;
|
||||
#pragma endregion Engine Forwards
|
||||
|
||||
@ -68,6 +74,9 @@ class AGasaPlayerController;
|
||||
class AGasaPlayerState;
|
||||
class APlayerCharacter;
|
||||
|
||||
class UAttributeMenu;
|
||||
class UAttributeMenu_FramedValue;
|
||||
class UAttributeMenu_TextValueRow;
|
||||
class UGasaAbilitySystemComp;
|
||||
class UGasaAttributeSet;
|
||||
class UGasaDevOptions;
|
||||
|
3
Project/Source/Gasa/UI/AttributeMenu/AttributeMenu.cpp
Normal file
3
Project/Source/Gasa/UI/AttributeMenu/AttributeMenu.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "AttributeMenu.h"
|
||||
|
||||
|
14
Project/Source/Gasa/UI/AttributeMenu/AttributeMenu.h
Normal file
14
Project/Source/Gasa/UI/AttributeMenu/AttributeMenu.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "UI/GasaUserWidget.h"
|
||||
|
||||
#include "AttributeMenu.generated.h"
|
||||
|
||||
UCLASS(Blueprintable)
|
||||
class GASA_API UAttributeMenu : public UGasaUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
|
||||
};
|
26
Project/Source/Gasa/UI/AttributeMenu/FramedValue.cpp
Normal file
26
Project/Source/Gasa/UI/AttributeMenu/FramedValue.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "FramedValue.h"
|
||||
|
||||
#include "UI/GasaImage.h"
|
||||
#include "Components/TextBlock.h"
|
||||
#include "UI/GasaSizeBox.h"
|
||||
|
||||
void UAttributeMenu_FramedValue::SetBackgroundBrush(FSlateBrush Brush)
|
||||
{
|
||||
BG->SetBrush(Brush);
|
||||
}
|
||||
|
||||
void UAttributeMenu_FramedValue::SetBorderBrush(FSlateBrush Brush)
|
||||
{
|
||||
Border->SetBrush(Brush);
|
||||
}
|
||||
|
||||
void UAttributeMenu_FramedValue::SetBoxSize(float Width, float Height)
|
||||
{
|
||||
SB_Root->SetWidthOverride(Width);
|
||||
SB_Root->SetHeightOverride(Height);
|
||||
}
|
||||
|
||||
void UAttributeMenu_FramedValue::SetText(FText Content)
|
||||
{
|
||||
Value->SetText(Content);
|
||||
}
|
42
Project/Source/Gasa/UI/AttributeMenu/FramedValue.h
Normal file
42
Project/Source/Gasa/UI/AttributeMenu/FramedValue.h
Normal file
@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
#include "UI/GasaUserWidget.h"
|
||||
|
||||
#include "FramedValue.generated.h"
|
||||
|
||||
UCLASS(Blueprintable)
|
||||
class GASA_API UAttributeMenu_FramedValue : public UGasaUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UGasaSizeBox* SB_Root;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UGasaImage* BG;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UGasaImage* Border;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UTextBlock* Value;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame")
|
||||
float BoxHeight;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame")
|
||||
float BoxWidth;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetBackgroundBrush(FSlateBrush Brush);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetBorderBrush(FSlateBrush Brush);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetBoxSize(float Width, float Height);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetText(FText Content);
|
||||
};
|
21
Project/Source/Gasa/UI/AttributeMenu/TextValueRow.cpp
Normal file
21
Project/Source/Gasa/UI/AttributeMenu/TextValueRow.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "TextValueRow.h"
|
||||
|
||||
#include "Components/TextBlock.h"
|
||||
#include "UI/GasaSizeBox.h"
|
||||
|
||||
|
||||
void UAttributeMenu_TextValueRow::SetAttributeName(FText Name)
|
||||
{
|
||||
TB_AttributeName->SetText(Name);
|
||||
}
|
||||
|
||||
void UAttributeMenu_TextValueRow::SetBoxSize(float Width, float Height)
|
||||
{
|
||||
SB_Root->SetWidthOverride(Width);
|
||||
SB_Root->SetHeightOverride(Height);
|
||||
}
|
||||
|
||||
void UAttributeMenu_TextValueRow::NativePreConstruct()
|
||||
{
|
||||
Super::NativePreConstruct();
|
||||
}
|
43
Project/Source/Gasa/UI/AttributeMenu/TextValueRow.h
Normal file
43
Project/Source/Gasa/UI/AttributeMenu/TextValueRow.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#include "UI/GasaUserWidget.h"
|
||||
|
||||
#include "TextValueRow.generated.h"
|
||||
|
||||
UCLASS(Blueprintable)
|
||||
class GASA_API UAttributeMenu_TextValueRow : public UGasaUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UGasaSizeBox* SB_Root;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UTextBlock* TB_AttributeName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UAttributeMenu_FramedValue* Value;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame", meta=(BindWidget))
|
||||
UNamedSlot* NSlot;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame")
|
||||
FText AttributeName;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame")
|
||||
float BoxHeight;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Frame")
|
||||
float BoxWidth;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetAttributeName(FText Name);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetBoxSize(float Width, float Height);
|
||||
|
||||
#pragma region UserWidget
|
||||
void NativePreConstruct() override;
|
||||
#pragma endregion UserWidget
|
||||
};
|
@ -196,4 +196,3 @@ void UGlobeProgressBar::Serialize(FStructuredArchive::FRecord Record)
|
||||
Super::Serialize(Record);
|
||||
}
|
||||
#pragma endregion UserWidget
|
||||
|
||||
|
Reference in New Issue
Block a user