Files
Cog/Plugins/CogAI/Source/CogAI/Public/CogAIWindow_BehaviorTree.h
T
Arnaud Jamin e72504b47a CogWindow: CogWindows are not UObject anymore
CogWindows are now normal object because we want to be able to Ifdef them, and UObject cannot be ifdef. CogWindows were UObject mainly for saving their config. The configs have been moved in separated class, which are UObject.
2023-10-27 02:39:33 -04:00

59 lines
1.4 KiB
C++

#pragma once
#include "CoreMinimal.h"
#include "CogWindow.h"
#include "CogWindowConfig.h"
#include "CogAIWindow_BehaviorTree.generated.h"
class UBehaviorTreeComponent;
class UBTNode;
class UCogAIConfig_BehaviorTree;
//--------------------------------------------------------------------------------------------------------------------------
class COGAI_API FCogAIWindow_BehaviorTree : public FCogWindow
{
typedef FCogWindow Super;
public:
virtual void Initialize() override;
protected:
virtual void GameTick(float DeltaTime) override;
virtual void RenderHelp() override;
virtual void RenderContent() override;
virtual void RenderNode(UBehaviorTreeComponent& BehaviorTreeComponent, UBTNode* Node, bool OpenAllChildren);
private:
ImGuiTextFilter Filter;
TObjectPtr<UCogAIConfig_BehaviorTree> Config = nullptr;
};
//--------------------------------------------------------------------------------------------------------------------------
UCLASS(Config = Cog)
class UCogAIConfig_BehaviorTree : public UCogWindowConfig
{
GENERATED_BODY()
public:
UPROPERTY(Config)
FVector4f ActiveColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
UPROPERTY(Config)
FVector4f InactiveColor = FVector4f(1.0f, 1.0f, 1.0f, 0.2f);
virtual void Reset() override
{
Super::Reset();
ActiveColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
InactiveColor = FVector4f(1.0f, 1.0f, 1.0f, 0.2f);
}
};