update non-module GasaGen
This commit is contained in:
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