Add MVP character archetype choice

This commit is contained in:
2026-05-18 20:59:37 -07:00
parent 5efd81ca4b
commit c855924034
6 changed files with 167 additions and 5 deletions
@@ -15,6 +15,13 @@ enum class EAgrarianMvpFrontendScreen : uint8
Loading
};
UENUM(BlueprintType)
enum class EAgrarianMvpCharacterArchetype : uint8
{
YoungAdultMale,
YoungAdultFemale
};
UCLASS()
class AGRARIANGAME_API UAgrarianMvpFrontendWidget : public UUserWidget
{
@@ -24,6 +31,9 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI")
EAgrarianMvpFrontendScreen ActiveScreen = EAgrarianMvpFrontendScreen::MainMenu;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI")
EAgrarianMvpCharacterArchetype SelectedCharacterArchetype = EAgrarianMvpCharacterArchetype::YoungAdultMale;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI")
FText MainMenuTitle = FText::FromString(TEXT("Agrarian"));
@@ -42,7 +52,14 @@ public:
UFUNCTION(BlueprintCallable, Category = "Agrarian|MVP UI")
void SetActiveScreen(EAgrarianMvpFrontendScreen NewScreen);
UFUNCTION(BlueprintCallable, Category = "Agrarian|MVP UI")
void SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype NewArchetype);
protected:
virtual void NativeConstruct() override;
virtual FReply NativeOnKeyDown(const FGeometry& InGeometry, const FKeyEvent& InKeyEvent) override;
virtual int32 NativePaint(
const FPaintArgs& Args,
const FGeometry& AllottedGeometry,
@@ -69,6 +86,8 @@ private:
const FVector2D& PanelSize,
float Scale) const;
FText GetSelectedCharacterLabel() const;
void DrawTextAt(
FSlateWindowElementList& OutDrawElements,
int32& LayerId,