36 lines
860 B
C++
36 lines
860 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "ResComUIStateManager.h"
|
|
|
|
void AResComUIStateManager::SetState(const TEnumAsByte<Enum_UIState> newState)
|
|
{
|
|
if (stateManager.SetState(newState))
|
|
OnState(newState);
|
|
}
|
|
|
|
void AResComUIStateManager::ClearAllStatesBesideLast()
|
|
{
|
|
stateManager.ClearAllStatesBesideLast();
|
|
}
|
|
|
|
void AResComUIStateManager::SetPreviousState()
|
|
{
|
|
if (stateManager.SetPrevState())
|
|
OnState(stateManager.GetState());
|
|
}
|
|
|
|
const FString AResComUIStateManager::GetStateHistoryAsString() const
|
|
{
|
|
FString string;
|
|
FString arrow("->");
|
|
auto history = stateManager.GetHistory();
|
|
for (auto item : history)
|
|
string += arrow + (*UEnum::GetDisplayValueAsText(item).ToString());
|
|
return string;
|
|
}
|
|
|
|
const TEnumAsByte<Enum_UIState> AResComUIStateManager::GetState() const
|
|
{
|
|
return stateManager.GetState();
|
|
} |