March 2019
Intermediate to advanced
708 pages
17h 9m
English
#pragma once#include "CoreMinimal.h"#include "GameFramework/GameStateBase.h"#include "SlateBasics.h"#include "AttributeGameMode.generated.h"/** * */UCLASS()class CHAPTER_14_API AAttributeGameMode : public AGameModeBase{ GENERATED_BODY() TSharedPtr<SVerticalBox> Widget; FText GetButtonLabel() const;public: virtual void BeginPlay() override; };
void AAttributeGameMode::BeginPlay(){ Super::BeginPlay(); Widget = SNew(SVerticalBox) + SVerticalBox::Slot() .HAlign(HAlign_Center) .VAlign(VAlign_Center) [ SNew(SButton) .Content() [ SNew(STextBlock) .Text(TAttribute<FText>::Create(TAttribute<FText>::FGetter::CreateUObject(this, ...Read now
Unlock full access