56 lines
1.6 KiB
C++
56 lines
1.6 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "ResComStateManager.h"
|
|
#include "ResComUIStateManager.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
|
|
UENUM(BlueprintType)
|
|
enum Enum_UIState
|
|
{
|
|
none UMETA(DisplayName = "none"),
|
|
home UMETA(DisplayName = "home"),
|
|
menu_main UMETA(DisplayName = "menu_main"),
|
|
menu_flat UMETA(DisplayName = "menu_flat"),
|
|
information UMETA(DisplayName = "information"),
|
|
infrastructure UMETA(DisplayName = "infrastructure"),
|
|
login UMETA(DisplayName = "login"),
|
|
loading UMETA(DisplayName = "loading"),
|
|
presentation UMETA(DisplayName = "presentation"),
|
|
filter UMETA(DisplayName = "filter"),
|
|
elevator UMETA(DisplayName = "elevator"),
|
|
walking_menu UMETA(DisplayName = "walking_menu"),
|
|
};
|
|
|
|
UCLASS()
|
|
class FORTIS_TAKTIKA_API AResComUIStateManager : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
private:
|
|
ResComStateManager<Enum_UIState> stateManager;
|
|
public:
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void SetState(const TEnumAsByte<Enum_UIState> newState);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void ClearAllStatesBesideLast();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void SetPreviousState();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
const TEnumAsByte<Enum_UIState> GetState() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Debug")
|
|
const FString GetStateHistoryAsString() const;
|
|
|
|
// blueprint reaction
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "StateReaction")
|
|
void OnState(const TEnumAsByte<Enum_UIState>& newState);
|
|
};
|