mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-06 07:38:46 +00:00
fix build error
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
#include "CogAbilityWindow_Abilities.h"
|
#include "CogAbilityWindow_Abilities.h"
|
||||||
|
|
||||||
|
#include "AbilitySystemGlobals.h"
|
||||||
|
#include "AbilitySystemComponent.h"
|
||||||
#include "CogAbilityDataAsset.h"
|
#include "CogAbilityDataAsset.h"
|
||||||
#include "CogAbilityHelper.h"
|
#include "CogAbilityHelper.h"
|
||||||
|
#include "CogAbilityReplicator.h"
|
||||||
#include "CogImguiHelper.h"
|
#include "CogImguiHelper.h"
|
||||||
#include "CogWindowWidgets.h"
|
#include "CogWindowWidgets.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
@@ -290,13 +293,13 @@ void UCogAbilityWindow_Abilities::RenderAbilityContextMenu(UAbilitySystemCompone
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogAbilityWindow_Abilities::OpenAbility(FGameplayAbilitySpecHandle Handle)
|
void UCogAbilityWindow_Abilities::OpenAbility(const FGameplayAbilitySpecHandle& Handle)
|
||||||
{
|
{
|
||||||
OpenedAbilities.AddUnique(Handle);
|
OpenedAbilities.AddUnique(Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogAbilityWindow_Abilities::CloseAbility(FGameplayAbilitySpecHandle Handle)
|
void UCogAbilityWindow_Abilities::CloseAbility(const FGameplayAbilitySpecHandle& Handle)
|
||||||
{
|
{
|
||||||
OpenedAbilities.Remove(Handle);
|
OpenedAbilities.Remove(Handle);
|
||||||
}
|
}
|
||||||
@@ -448,7 +451,7 @@ void UCogAbilityWindow_Abilities::GameTick(float DeltaTime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogAbilityWindow_Abilities::ProcessAbilityActivation(FGameplayAbilitySpecHandle Handle)
|
void UCogAbilityWindow_Abilities::ProcessAbilityActivation(const FGameplayAbilitySpecHandle& Handle)
|
||||||
{
|
{
|
||||||
AActor* Selection = GetSelection();
|
AActor* Selection = GetSelection();
|
||||||
if (Selection == nullptr)
|
if (Selection == nullptr)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "CogCommonAllegianceActorInterface.h"
|
#include "CogCommonAllegianceActorInterface.h"
|
||||||
#include "CogDebugDraw.h"
|
#include "CogDebugDraw.h"
|
||||||
#include "CogImguiHelper.h"
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
#include "EngineUtils.h"
|
#include "EngineUtils.h"
|
||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
@@ -94,11 +95,13 @@ void UCogAbilityWindow_Cheats::RenderContent()
|
|||||||
AActor* SelectedActor = GetSelection();
|
AActor* SelectedActor = GetSelection();
|
||||||
if (SelectedActor == nullptr)
|
if (SelectedActor == nullptr)
|
||||||
{
|
{
|
||||||
|
ImGui::Text("Invlid Selection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Asset == nullptr)
|
if (Asset == nullptr)
|
||||||
{
|
{
|
||||||
|
ImGui::Text("Invalid Asset");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "AttributeSet.h"
|
#include "AttributeSet.h"
|
||||||
#include "CogAbilityDataAsset.h"
|
#include "CogAbilityDataAsset.h"
|
||||||
#include "CogAbilityHelper.h"
|
#include "CogAbilityHelper.h"
|
||||||
|
#include "CogImguiHelper.h"
|
||||||
#include "CogWindowWidgets.h"
|
#include "CogWindowWidgets.h"
|
||||||
#include "EngineUtils.h"
|
#include "EngineUtils.h"
|
||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#include "CogAbilityWindow_Pools.h"
|
#include "CogAbilityWindow_Pools.h"
|
||||||
|
|
||||||
#include "AbilitySystemComponent.h"
|
#include "AbilitySystemComponent.h"
|
||||||
|
#include "AbilitySystemGlobals.h"
|
||||||
#include "CogAbilityDataAsset.h"
|
#include "CogAbilityDataAsset.h"
|
||||||
#include "CogImguiHelper.h"
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
|
#include "imgui_internal.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogAbilityWindow_Pools::RenderHelp()
|
void UCogAbilityWindow_Pools::RenderHelp()
|
||||||
|
|||||||
@@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
#include "AbilitySystemComponent.h"
|
#include "AbilitySystemComponent.h"
|
||||||
#include "CogAbilityDataAsset.h"
|
#include "CogAbilityDataAsset.h"
|
||||||
|
#include "CogAbilityReplicator.h"
|
||||||
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
UCogAbilityWindow_Tweaks::UCogAbilityWindow_Tweaks()
|
||||||
|
{
|
||||||
|
bHasMenu = true;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogAbilityWindow_Tweaks::RenderHelp()
|
void UCogAbilityWindow_Tweaks::RenderHelp()
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "CogWindow.h"
|
#include "CogWindow.h"
|
||||||
|
#include "GameplayAbilitySpecHandle.h"
|
||||||
#include "CogAbilityWindow_Abilities.generated.h"
|
#include "CogAbilityWindow_Abilities.generated.h"
|
||||||
|
|
||||||
|
class UAbilitySystemComponent;
|
||||||
class UGameplayAbility;
|
class UGameplayAbility;
|
||||||
class UCogAbilityDataAsset;
|
class UCogAbilityDataAsset;
|
||||||
struct FGameplayAbilitySpec;
|
struct FGameplayAbilitySpec;
|
||||||
@@ -17,7 +19,9 @@ public:
|
|||||||
|
|
||||||
UCogAbilityWindow_Abilities();
|
UCogAbilityWindow_Abilities();
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -43,15 +47,15 @@ protected:
|
|||||||
|
|
||||||
virtual void RenderAbilityInfo(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
virtual void RenderAbilityInfo(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||||
|
|
||||||
virtual void ProcessAbilityActivation(FGameplayAbilitySpecHandle Handle);
|
virtual void ProcessAbilityActivation(const FGameplayAbilitySpecHandle& Handle);
|
||||||
|
|
||||||
virtual void ActivateAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
virtual void ActivateAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||||
|
|
||||||
virtual void DeactivateAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
virtual void DeactivateAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||||
|
|
||||||
virtual void OpenAbility(FGameplayAbilitySpecHandle Handle);
|
virtual void OpenAbility(const FGameplayAbilitySpecHandle& Handle);
|
||||||
|
|
||||||
virtual void CloseAbility(FGameplayAbilitySpecHandle Handle);
|
virtual void CloseAbility(const FGameplayAbilitySpecHandle& Handle);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -60,4 +64,7 @@ private:
|
|||||||
FGameplayAbilitySpecHandle AbilityHandleToRemove;
|
FGameplayAbilitySpecHandle AbilityHandleToRemove;
|
||||||
|
|
||||||
TArray<FGameplayAbilitySpecHandle> OpenedAbilities;
|
TArray<FGameplayAbilitySpecHandle> OpenedAbilities;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
#include "CogWindow.h"
|
#include "CogWindow.h"
|
||||||
#include "CogAbilityWindow_Attributes.generated.h"
|
#include "CogAbilityWindow_Attributes.generated.h"
|
||||||
|
|
||||||
|
class UAbilitySystemComponent;
|
||||||
class UCogAbilityDataAsset;
|
class UCogAbilityDataAsset;
|
||||||
|
struct FGameplayAttribute;
|
||||||
|
|
||||||
UCLASS(Config = Cog)
|
UCLASS(Config = Cog)
|
||||||
class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow
|
class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow
|
||||||
@@ -13,9 +15,11 @@ class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UCogAbilityWindow_Attributes();
|
UCogAbilityWindow_Attributes();
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -42,4 +46,7 @@ private:
|
|||||||
bool bShowOnlyModified = false;
|
bool bShowOnlyModified = false;
|
||||||
|
|
||||||
ImGuiTextFilter Filter;
|
ImGuiTextFilter Filter;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,5 +44,6 @@ private:
|
|||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
TArray<FString> AppliedCheats;
|
TArray<FString> AppliedCheats;
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,11 @@
|
|||||||
#include "CogWindow.h"
|
#include "CogWindow.h"
|
||||||
#include "CogAbilityWindow_Effects.generated.h"
|
#include "CogAbilityWindow_Effects.generated.h"
|
||||||
|
|
||||||
|
class UAbilitySystemComponent;
|
||||||
class UCogAbilityDataAsset;
|
class UCogAbilityDataAsset;
|
||||||
|
class UGameplayEffect;
|
||||||
|
struct FActiveGameplayEffect;
|
||||||
|
struct FActiveGameplayEffectHandle;
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class COGABILITY_API UCogAbilityWindow_Effects : public UCogWindow
|
class COGABILITY_API UCogAbilityWindow_Effects : public UCogWindow
|
||||||
@@ -16,7 +20,9 @@ public:
|
|||||||
|
|
||||||
UCogAbilityWindow_Effects();
|
UCogAbilityWindow_Effects();
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -39,4 +45,7 @@ protected:
|
|||||||
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||||
|
|
||||||
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ class COGABILITY_API UCogAbilityWindow_Pools : public UCogWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -26,4 +28,6 @@ protected:
|
|||||||
|
|
||||||
virtual void DrawPool(const UAbilitySystemComponent* AbilitySystemComponent, const FCogAbilityPool& Pool);
|
virtual void DrawPool(const UAbilitySystemComponent* AbilitySystemComponent, const FCogAbilityPool& Pool);
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ class COGABILITY_API UCogAbilityWindow_Tweaks : public UCogWindow
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
|
||||||
|
UCogAbilityWindow_Tweaks();
|
||||||
|
|
||||||
|
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -24,4 +29,7 @@ protected:
|
|||||||
virtual void DrawTweak(ACogAbilityReplicator* Replicator, int32 TweakIndex, int32 TweakCategoryIndex);
|
virtual void DrawTweak(ACogAbilityReplicator* Replicator, int32 TweakIndex, int32 TweakCategoryIndex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void UCogEngineWindow_Collisions::RenderHelp()
|
|||||||
ImGui::Text("This window is used to inspect collisions by performing a collision query with the selected channels. "
|
ImGui::Text("This window is used to inspect collisions by performing a collision query with the selected channels. "
|
||||||
"The query can be configured in the options. "
|
"The query can be configured in the options. "
|
||||||
"The displayed collision channels can be configured in the '%s' data asset. "
|
"The displayed collision channels can be configured in the '%s' data asset. "
|
||||||
, TCHAR_TO_ANSI(*GetNameSafe(CollisionsAsset.Get()))
|
, TCHAR_TO_ANSI(*GetNameSafe(Asset.Get()))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,8 +383,10 @@ void UCogEngineWindow_Collisions::RenderContent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogEngineWindow_Collisions::SetAsset(const UCogEngineDataAsset* Asset)
|
void UCogEngineWindow_Collisions::SetAsset(const UCogEngineDataAsset* Value)
|
||||||
{
|
{
|
||||||
|
Asset = Value;
|
||||||
|
|
||||||
if (Asset == nullptr)
|
if (Asset == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "CogImguiHelper.h"
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
#include "Engine/Engine.h"
|
#include "Engine/Engine.h"
|
||||||
|
|
||||||
|
|
||||||
#define SCALABILITY_NUM_LEVELS 5
|
#define SCALABILITY_NUM_LEVELS 5
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#include "CogEngineWindow_Spawns.h"
|
#include "CogEngineWindow_Spawns.h"
|
||||||
|
|
||||||
#include "CogEngineDataAsset.h"
|
#include "CogEngineDataAsset.h"
|
||||||
|
#include "CogEngineReplicator.h"
|
||||||
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogEngineWindow_Spawns::RenderHelp()
|
void UCogEngineWindow_Spawns::RenderHelp()
|
||||||
@@ -8,7 +11,7 @@ void UCogEngineWindow_Spawns::RenderHelp()
|
|||||||
ImGui::Text(
|
ImGui::Text(
|
||||||
"This window can be used to spawn new actors in the world. "
|
"This window can be used to spawn new actors in the world. "
|
||||||
"The spawn list can be configured in the '%s' data asset. "
|
"The spawn list can be configured in the '%s' data asset. "
|
||||||
, TCHAR_TO_ANSI(*GetNameSafe(SpawnAsset))
|
, TCHAR_TO_ANSI(*GetNameSafe(Asset.Get()))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,12 +20,12 @@ void UCogEngineWindow_Spawns::RenderContent()
|
|||||||
{
|
{
|
||||||
Super::RenderContent();
|
Super::RenderContent();
|
||||||
|
|
||||||
if (SpawnAsset == nullptr)
|
if (Asset == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const FCogEngineSpawnGroup& SpawnGroup : SpawnAsset->SpawnGroups)
|
for (const FCogEngineSpawnGroup& SpawnGroup : Asset->SpawnGroups)
|
||||||
{
|
{
|
||||||
RenderSpawnGroup(SpawnGroup);
|
RenderSpawnGroup(SpawnGroup);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "CogWindow.h"
|
#include "CogWindow.h"
|
||||||
#include "CogEngineWindow_Collisions.generated.h"
|
#include "CogEngineWindow_Collisions.generated.h"
|
||||||
|
|
||||||
class UCogEngineDataAsset_Collisions;
|
class UCogEngineDataAsset;
|
||||||
|
|
||||||
UCLASS(Config = Cog)
|
UCLASS(Config = Cog)
|
||||||
class COGENGINE_API UCogEngineWindow_Collisions : public UCogWindow
|
class COGENGINE_API UCogEngineWindow_Collisions : public UCogWindow
|
||||||
@@ -15,7 +15,9 @@ public:
|
|||||||
|
|
||||||
UCogEngineWindow_Collisions();
|
UCogEngineWindow_Collisions();
|
||||||
|
|
||||||
void SetAsset(const UCogEngineDataAsset* Asset);
|
const UCogEngineDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogEngineDataAsset* Value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -31,8 +33,6 @@ private:
|
|||||||
FColor Color;
|
FColor Color;
|
||||||
};
|
};
|
||||||
|
|
||||||
TWeakObjectPtr<UCogEngineDataAsset> CollisionsAsset;
|
|
||||||
|
|
||||||
FChannel Channels[ECC_MAX];
|
FChannel Channels[ECC_MAX];
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
@@ -58,4 +58,7 @@ private:
|
|||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool ShowQuery = false;
|
bool ShowQuery = false;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,9 +16,14 @@ public:
|
|||||||
virtual void RenderContent() override;
|
virtual void RenderContent() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool bShowImguiDemo = false;
|
bool bShowImguiDemo = false;
|
||||||
|
|
||||||
bool bShowImguiPlot = false;
|
bool bShowImguiPlot = false;
|
||||||
|
|
||||||
bool bShowImguiMetric = false;
|
bool bShowImguiMetric = false;
|
||||||
|
|
||||||
bool bShowImguiDebugLog = false;
|
bool bShowImguiDebugLog = false;
|
||||||
|
|
||||||
bool bShowImguiStyleEditor = false;
|
bool bShowImguiStyleEditor = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class COGENGINE_API UCogEngineWindow_Scalability : public UCogWindow
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void RenderHelp() override;
|
virtual void RenderHelp() override;
|
||||||
|
|
||||||
virtual void RenderContent() override;
|
virtual void RenderContent() override;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
class UCogEngineDataAsset;
|
class UCogEngineDataAsset;
|
||||||
struct FCogEngineSpawnGroup;
|
struct FCogEngineSpawnGroup;
|
||||||
|
struct FCogEngineSpawnEntry;
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
||||||
@@ -14,9 +15,9 @@ class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const UCogEngineDataAsset* GetSpawnsAsset() const { return SpawnAsset; }
|
const UCogEngineDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
void SetAsset(const UCogEngineDataAsset* Value) { SpawnAsset = Value; }
|
void SetAsset(const UCogEngineDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -30,5 +31,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const UCogEngineDataAsset* SpawnAsset = nullptr;
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
#include "CogImguiHelper.h"
|
#include "CogImguiHelper.h"
|
||||||
#include "CogInputDataAsset.h"
|
#include "CogInputDataAsset.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
#include "Engine/LocalPlayer.h"
|
#include "Engine/LocalPlayer.h"
|
||||||
#include "EnhancedInputSubsystems.h"
|
#include "EnhancedInputSubsystems.h"
|
||||||
#include "imgui_internal.h"
|
#include "imgui_internal.h"
|
||||||
|
#include "InputMappingContext.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
UCogInputWindow_Gamepad::UCogInputWindow_Gamepad()
|
UCogInputWindow_Gamepad::UCogInputWindow_Gamepad()
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ public:
|
|||||||
|
|
||||||
UCogInputWindow_Actions();
|
UCogInputWindow_Actions();
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
const UCogInputDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogInputDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -37,5 +39,8 @@ private:
|
|||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
float RepeatTime = 0.0f;
|
float RepeatTime = 0.0f;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogInputDataAsset> Asset = nullptr;
|
||||||
|
|
||||||
TArray<FCogInjectActionInfo> Actions;
|
TArray<FCogInjectActionInfo> Actions;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "CogInjectActionInfo.h"
|
||||||
#include "CogWindow.h"
|
#include "CogWindow.h"
|
||||||
#include "CogInputWindow_Gamepad.generated.h"
|
#include "CogInputWindow_Gamepad.generated.h"
|
||||||
|
|
||||||
@@ -17,7 +18,9 @@ public:
|
|||||||
|
|
||||||
UCogInputWindow_Gamepad();
|
UCogInputWindow_Gamepad();
|
||||||
|
|
||||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
const UCogInputDataAsset* GetAsset() const { return Asset.Get(); }
|
||||||
|
|
||||||
|
void SetAsset(const UCogInputDataAsset* Value) { Asset = Value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -66,6 +69,9 @@ private:
|
|||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
float Border = 0.02f;
|
float Border = 0.02f;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
||||||
|
|
||||||
TMap<FKey, FCogInjectActionInfo> Actions;
|
TMap<FKey, FCogInjectActionInfo> Actions;
|
||||||
|
|
||||||
UEnhancedPlayerInput* Input = nullptr;
|
UEnhancedPlayerInput* Input = nullptr;
|
||||||
|
|||||||
@@ -87,6 +87,11 @@ void UCogWindow::Render(float DeltaTime)
|
|||||||
if (ImGui::BeginPopupContextWindow())
|
if (ImGui::BeginPopupContextWindow())
|
||||||
{
|
{
|
||||||
ImGui::Checkbox("Hide Menu", &bHideMenu);
|
ImGui::Checkbox("Hide Menu", &bHideMenu);
|
||||||
|
|
||||||
|
if (ImGui::Button("Reset"))
|
||||||
|
{
|
||||||
|
ResetConfig();
|
||||||
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void UCogWindowManager::Render(float DeltaTime)
|
|||||||
{
|
{
|
||||||
if (FCogImguiModule::Get().GetEnableInput())
|
if (FCogImguiModule::Get().GetEnableInput())
|
||||||
{
|
{
|
||||||
DrawMainMenu();
|
RenderMainMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,13 +253,13 @@ UCogWindowManager::FMenu* UCogWindowManager::AddMenu(const FString& Name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogWindowManager::DrawMainMenu()
|
void UCogWindowManager::RenderMainMenu()
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMainMenuBar())
|
if (ImGui::BeginMainMenuBar())
|
||||||
{
|
{
|
||||||
for (UCogWindowManager::FMenu& Menu : MainMenu.SubMenus)
|
for (UCogWindowManager::FMenu& Menu : MainMenu.SubMenus)
|
||||||
{
|
{
|
||||||
DrawMenu(Menu);
|
RenderMenu(Menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Window"))
|
if (ImGui::BeginMenu("Window"))
|
||||||
@@ -317,7 +317,7 @@ void UCogWindowManager::DrawMainMenu()
|
|||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
DrawMenuItem(*SettingsWindow, "Settings");
|
RenderMenuItem(*SettingsWindow, "Settings");
|
||||||
|
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
@@ -342,11 +342,11 @@ void UCogWindowManager::DrawMainMenu()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogWindowManager::DrawMenu(UCogWindowManager::FMenu& Menu)
|
void UCogWindowManager::RenderMenu(UCogWindowManager::FMenu& Menu)
|
||||||
{
|
{
|
||||||
if (Menu.Window != nullptr)
|
if (Menu.Window != nullptr)
|
||||||
{
|
{
|
||||||
DrawMenuItem(*Menu.Window, TCHAR_TO_ANSI(*Menu.Name));
|
RenderMenuItem(*Menu.Window, TCHAR_TO_ANSI(*Menu.Name));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -354,7 +354,7 @@ void UCogWindowManager::DrawMenu(UCogWindowManager::FMenu& Menu)
|
|||||||
{
|
{
|
||||||
for (UCogWindowManager::FMenu& SubMenu : Menu.SubMenus)
|
for (UCogWindowManager::FMenu& SubMenu : Menu.SubMenus)
|
||||||
{
|
{
|
||||||
DrawMenu(SubMenu);
|
RenderMenu(SubMenu);
|
||||||
}
|
}
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ void UCogWindowManager::DrawMenu(UCogWindowManager::FMenu& Menu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
void UCogWindowManager::DrawMenuItem(UCogWindow& Window, const char* MenuItemName)
|
void UCogWindowManager::RenderMenuItem(UCogWindow& Window, const char* MenuItemName)
|
||||||
{
|
{
|
||||||
if (bShowWindowsInMainMenu)
|
if (bShowWindowsInMainMenu)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,13 +89,13 @@ protected:
|
|||||||
|
|
||||||
void RefreshDPIScale();
|
void RefreshDPIScale();
|
||||||
|
|
||||||
void DrawMainMenu();
|
void RenderMainMenu();
|
||||||
|
|
||||||
FMenu* AddMenu(const FString& Name);
|
FMenu* AddMenu(const FString& Name);
|
||||||
|
|
||||||
void DrawMenu(FMenu& Menu);
|
void RenderMenu(FMenu& Menu);
|
||||||
|
|
||||||
void DrawMenuItem(UCogWindow& Window, const char* MenuItemName);
|
void RenderMenuItem(UCogWindow& Window, const char* MenuItemName);
|
||||||
|
|
||||||
static void SettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*);
|
static void SettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*);
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,7 @@ public class CogSampleTarget : TargetRules
|
|||||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
DefaultBuildSettings = BuildSettingsVersion.V2;
|
||||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
||||||
ExtraModuleNames.Add("CogSample");
|
ExtraModuleNames.Add("CogSample");
|
||||||
}
|
//bUseUnityBuild = false;
|
||||||
|
//bUsePCHFiles = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,24 +167,24 @@ void ACogSampleGameState::InitializeCog()
|
|||||||
const UCogAbilityDataAsset* AbilityAsset = GetFirstAssetByClass<UCogAbilityDataAsset>();
|
const UCogAbilityDataAsset* AbilityAsset = GetFirstAssetByClass<UCogAbilityDataAsset>();
|
||||||
|
|
||||||
UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Abilities>("Gameplay.Abilities");
|
UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Abilities>("Gameplay.Abilities");
|
||||||
AbilitiesWindow->Asset = AbilityAsset;
|
AbilitiesWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
UCogAbilityWindow_Attributes* AttributesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Attributes>("Gameplay.Attributes");
|
UCogAbilityWindow_Attributes* AttributesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Attributes>("Gameplay.Attributes");
|
||||||
AttributesWindow->Asset = AbilityAsset;
|
AttributesWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
UCogAbilityWindow_Cheats* CheatsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Cheats>("Gameplay.Cheats");
|
UCogAbilityWindow_Cheats* CheatsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Cheats>("Gameplay.Cheats");
|
||||||
CheatsWindow->SetAsset(AbilityAsset);
|
CheatsWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Effects>("Gameplay.Effects");
|
UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Effects>("Gameplay.Effects");
|
||||||
EffectsWindow->Asset = AbilityAsset;
|
EffectsWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
UCogAbilityWindow_Pools* PoolsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Pools>("Gameplay.Pools");
|
UCogAbilityWindow_Pools* PoolsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Pools>("Gameplay.Pools");
|
||||||
PoolsWindow->Asset = AbilityAsset;
|
PoolsWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Tags>("Gameplay.Tags");
|
CogWindowManager->CreateWindow<UCogAbilityWindow_Tags>("Gameplay.Tags");
|
||||||
|
|
||||||
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||||
TweaksWindow->Asset = AbilityAsset;
|
TweaksWindow->SetAsset(AbilityAsset);
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// Input
|
// Input
|
||||||
@@ -192,10 +192,10 @@ void ACogSampleGameState::InitializeCog()
|
|||||||
const UCogInputDataAsset* InputAsset = GetFirstAssetByClass<UCogInputDataAsset>();
|
const UCogInputDataAsset* InputAsset = GetFirstAssetByClass<UCogInputDataAsset>();
|
||||||
|
|
||||||
UCogInputWindow_Actions* ActionsWindow = CogWindowManager->CreateWindow<UCogInputWindow_Actions>("Input.Actions");
|
UCogInputWindow_Actions* ActionsWindow = CogWindowManager->CreateWindow<UCogInputWindow_Actions>("Input.Actions");
|
||||||
ActionsWindow->Asset = InputAsset;
|
ActionsWindow->SetAsset(InputAsset);
|
||||||
|
|
||||||
UCogInputWindow_Gamepad* GamepadWindow = CogWindowManager->CreateWindow<UCogInputWindow_Gamepad>("Input.Gamepad");
|
UCogInputWindow_Gamepad* GamepadWindow = CogWindowManager->CreateWindow<UCogInputWindow_Gamepad>("Input.Gamepad");
|
||||||
GamepadWindow->Asset = InputAsset;
|
GamepadWindow->SetAsset(InputAsset);
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// Main Menu Widget
|
// Main Menu Widget
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using UnrealBuildTool;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public class CogSampleTarget : TargetRules
|
||||||
|
{
|
||||||
|
public CogSampleTarget(TargetInfo Target) : base(Target)
|
||||||
|
{
|
||||||
|
Type = TargetType.Game;
|
||||||
|
DefaultBuildSettings = BuildSettingsVersion.V2;
|
||||||
|
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
||||||
|
ExtraModuleNames.Add("CogSample");
|
||||||
|
bUseUnityBuild = false;
|
||||||
|
bUsePCHFiles = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user