update non-module GasaGen

This commit is contained in:
2024-12-15 14:13:44 -05:00
parent 2cf78790db
commit 0ad0b337b3
14 changed files with 362 additions and 141 deletions

View File

@ -0,0 +1,3 @@
#include "AttributeMenu.h"

View 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:
};

View 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);
}

View 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);
};

View 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();
}

View 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
};