mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-17 01:42:23 -07:00
fix build error
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
#include "CogAbilityWindow_Abilities.h"
|
||||
|
||||
#include "AbilitySystemGlobals.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "CogAbilityDataAsset.h"
|
||||
#include "CogAbilityHelper.h"
|
||||
#include "CogAbilityReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Abilities::CloseAbility(FGameplayAbilitySpecHandle Handle)
|
||||
void UCogAbilityWindow_Abilities::CloseAbility(const FGameplayAbilitySpecHandle& 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();
|
||||
if (Selection == nullptr)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "CogCommonAllegianceActorInterface.h"
|
||||
#include "CogDebugDraw.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "EngineUtils.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "imgui.h"
|
||||
@@ -94,11 +95,13 @@ void UCogAbilityWindow_Cheats::RenderContent()
|
||||
AActor* SelectedActor = GetSelection();
|
||||
if (SelectedActor == nullptr)
|
||||
{
|
||||
ImGui::Text("Invlid Selection");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Asset == nullptr)
|
||||
{
|
||||
ImGui::Text("Invalid Asset");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "AttributeSet.h"
|
||||
#include "CogAbilityDataAsset.h"
|
||||
#include "CogAbilityHelper.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "EngineUtils.h"
|
||||
#include "GameFramework/Character.h"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#include "CogAbilityWindow_Pools.h"
|
||||
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "AbilitySystemGlobals.h"
|
||||
#include "CogAbilityDataAsset.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "imgui_internal.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Pools::RenderHelp()
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "CogAbilityDataAsset.h"
|
||||
#include "CogAbilityReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCogAbilityWindow_Tweaks::UCogAbilityWindow_Tweaks()
|
||||
{
|
||||
bHasMenu = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Tweaks::RenderHelp()
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogWindow.h"
|
||||
#include "GameplayAbilitySpecHandle.h"
|
||||
#include "CogAbilityWindow_Abilities.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
class UGameplayAbility;
|
||||
class UCogAbilityDataAsset;
|
||||
struct FGameplayAbilitySpec;
|
||||
@@ -17,7 +19,9 @@ public:
|
||||
|
||||
UCogAbilityWindow_Abilities();
|
||||
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -43,15 +47,15 @@ protected:
|
||||
|
||||
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 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:
|
||||
|
||||
@@ -60,4 +64,7 @@ private:
|
||||
FGameplayAbilitySpecHandle AbilityHandleToRemove;
|
||||
|
||||
TArray<FGameplayAbilitySpecHandle> OpenedAbilities;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
#include "CogWindow.h"
|
||||
#include "CogAbilityWindow_Attributes.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
class UCogAbilityDataAsset;
|
||||
struct FGameplayAttribute;
|
||||
|
||||
UCLASS(Config = Cog)
|
||||
class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow
|
||||
@@ -13,9 +15,11 @@ class COGABILITY_API UCogAbilityWindow_Attributes : public UCogWindow
|
||||
|
||||
public:
|
||||
|
||||
UCogAbilityWindow_Attributes();
|
||||
UCogAbilityWindow_Attributes();
|
||||
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -42,4 +46,7 @@ private:
|
||||
bool bShowOnlyModified = false;
|
||||
|
||||
ImGuiTextFilter Filter;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -44,5 +44,6 @@ private:
|
||||
UPROPERTY(Config)
|
||||
TArray<FString> AppliedCheats;
|
||||
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,11 @@
|
||||
#include "CogWindow.h"
|
||||
#include "CogAbilityWindow_Effects.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
class UCogAbilityDataAsset;
|
||||
class UGameplayEffect;
|
||||
struct FActiveGameplayEffect;
|
||||
struct FActiveGameplayEffectHandle;
|
||||
|
||||
UCLASS()
|
||||
class COGABILITY_API UCogAbilityWindow_Effects : public UCogWindow
|
||||
@@ -16,7 +20,9 @@ public:
|
||||
|
||||
UCogAbilityWindow_Effects();
|
||||
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -39,4 +45,7 @@ protected:
|
||||
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||
|
||||
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -16,7 +16,9 @@ class COGABILITY_API UCogAbilityWindow_Pools : public UCogWindow
|
||||
|
||||
public:
|
||||
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -26,4 +28,6 @@ protected:
|
||||
|
||||
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()
|
||||
|
||||
public:
|
||||
TWeakObjectPtr<const UCogAbilityDataAsset> Asset;
|
||||
|
||||
UCogAbilityWindow_Tweaks();
|
||||
|
||||
const UCogAbilityDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogAbilityDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -24,4 +29,7 @@ protected:
|
||||
virtual void DrawTweak(ACogAbilityReplicator* Replicator, int32 TweakIndex, int32 TweakCategoryIndex);
|
||||
|
||||
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. "
|
||||
"The query can be configured in the options. "
|
||||
"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)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
#include "imgui.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "Engine/Engine.h"
|
||||
|
||||
|
||||
#define SCALABILITY_NUM_LEVELS 5
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "CogEngineWindow_Spawns.h"
|
||||
|
||||
#include "CogEngineDataAsset.h"
|
||||
#include "CogEngineReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Spawns::RenderHelp()
|
||||
@@ -8,7 +11,7 @@ void UCogEngineWindow_Spawns::RenderHelp()
|
||||
ImGui::Text(
|
||||
"This window can be used to spawn new actors in the world. "
|
||||
"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();
|
||||
|
||||
if (SpawnAsset == nullptr)
|
||||
if (Asset == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (const FCogEngineSpawnGroup& SpawnGroup : SpawnAsset->SpawnGroups)
|
||||
for (const FCogEngineSpawnGroup& SpawnGroup : Asset->SpawnGroups)
|
||||
{
|
||||
RenderSpawnGroup(SpawnGroup);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "CogWindow.h"
|
||||
#include "CogEngineWindow_Collisions.generated.h"
|
||||
|
||||
class UCogEngineDataAsset_Collisions;
|
||||
class UCogEngineDataAsset;
|
||||
|
||||
UCLASS(Config = Cog)
|
||||
class COGENGINE_API UCogEngineWindow_Collisions : public UCogWindow
|
||||
@@ -15,7 +15,9 @@ public:
|
||||
|
||||
UCogEngineWindow_Collisions();
|
||||
|
||||
void SetAsset(const UCogEngineDataAsset* Asset);
|
||||
const UCogEngineDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogEngineDataAsset* Value);
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,8 +33,6 @@ private:
|
||||
FColor Color;
|
||||
};
|
||||
|
||||
TWeakObjectPtr<UCogEngineDataAsset> CollisionsAsset;
|
||||
|
||||
FChannel Channels[ECC_MAX];
|
||||
|
||||
UPROPERTY(Config)
|
||||
@@ -58,4 +58,7 @@ private:
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowQuery = false;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -16,9 +16,14 @@ public:
|
||||
virtual void RenderContent() override;
|
||||
|
||||
private:
|
||||
|
||||
bool bShowImguiDemo = false;
|
||||
|
||||
bool bShowImguiPlot = false;
|
||||
|
||||
bool bShowImguiMetric = false;
|
||||
|
||||
bool bShowImguiDebugLog = false;
|
||||
|
||||
bool bShowImguiStyleEditor = false;
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ class COGENGINE_API UCogEngineWindow_Scalability : public UCogWindow
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
virtual void RenderHelp() override;
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class UCogEngineDataAsset;
|
||||
struct FCogEngineSpawnGroup;
|
||||
struct FCogEngineSpawnEntry;
|
||||
|
||||
UCLASS()
|
||||
class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
||||
@@ -14,9 +15,9 @@ class COGENGINE_API UCogEngineWindow_Spawns : public UCogWindow
|
||||
|
||||
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:
|
||||
|
||||
@@ -30,5 +31,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
const UCogEngineDataAsset* SpawnAsset = nullptr;
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogEngineDataAsset> Asset = nullptr;
|
||||
};
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogInputDataAsset.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "imgui_internal.h"
|
||||
#include "InputMappingContext.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCogInputWindow_Gamepad::UCogInputWindow_Gamepad()
|
||||
|
||||
@@ -17,7 +17,9 @@ public:
|
||||
|
||||
UCogInputWindow_Actions();
|
||||
|
||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
||||
const UCogInputDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogInputDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -37,5 +39,8 @@ private:
|
||||
UPROPERTY(Config)
|
||||
float RepeatTime = 0.0f;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogInputDataAsset> Asset = nullptr;
|
||||
|
||||
TArray<FCogInjectActionInfo> Actions;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogInjectActionInfo.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogInputWindow_Gamepad.generated.h"
|
||||
|
||||
@@ -17,7 +18,9 @@ public:
|
||||
|
||||
UCogInputWindow_Gamepad();
|
||||
|
||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
||||
const UCogInputDataAsset* GetAsset() const { return Asset.Get(); }
|
||||
|
||||
void SetAsset(const UCogInputDataAsset* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -66,6 +69,9 @@ private:
|
||||
UPROPERTY(Config)
|
||||
float Border = 0.02f;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
||||
|
||||
TMap<FKey, FCogInjectActionInfo> Actions;
|
||||
|
||||
UEnhancedPlayerInput* Input = nullptr;
|
||||
|
||||
@@ -87,6 +87,11 @@ void UCogWindow::Render(float DeltaTime)
|
||||
if (ImGui::BeginPopupContextWindow())
|
||||
{
|
||||
ImGui::Checkbox("Hide Menu", &bHideMenu);
|
||||
|
||||
if (ImGui::Button("Reset"))
|
||||
{
|
||||
ResetConfig();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void UCogWindowManager::Render(float DeltaTime)
|
||||
{
|
||||
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())
|
||||
{
|
||||
for (UCogWindowManager::FMenu& Menu : MainMenu.SubMenus)
|
||||
{
|
||||
DrawMenu(Menu);
|
||||
RenderMenu(Menu);
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Window"))
|
||||
@@ -317,7 +317,7 @@ void UCogWindowManager::DrawMainMenu()
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
DrawMenuItem(*SettingsWindow, "Settings");
|
||||
RenderMenuItem(*SettingsWindow, "Settings");
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
DrawMenuItem(*Menu.Window, TCHAR_TO_ANSI(*Menu.Name));
|
||||
RenderMenuItem(*Menu.Window, TCHAR_TO_ANSI(*Menu.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -354,7 +354,7 @@ void UCogWindowManager::DrawMenu(UCogWindowManager::FMenu& Menu)
|
||||
{
|
||||
for (UCogWindowManager::FMenu& SubMenu : Menu.SubMenus)
|
||||
{
|
||||
DrawMenu(SubMenu);
|
||||
RenderMenu(SubMenu);
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -89,13 +89,13 @@ protected:
|
||||
|
||||
void RefreshDPIScale();
|
||||
|
||||
void DrawMainMenu();
|
||||
void RenderMainMenu();
|
||||
|
||||
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*);
|
||||
|
||||
|
||||
@@ -9,5 +9,7 @@ public class CogSampleTarget : TargetRules
|
||||
DefaultBuildSettings = BuildSettingsVersion.V2;
|
||||
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
|
||||
ExtraModuleNames.Add("CogSample");
|
||||
}
|
||||
//bUseUnityBuild = false;
|
||||
//bUsePCHFiles = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,24 +167,24 @@ void ACogSampleGameState::InitializeCog()
|
||||
const UCogAbilityDataAsset* AbilityAsset = GetFirstAssetByClass<UCogAbilityDataAsset>();
|
||||
|
||||
UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Abilities>("Gameplay.Abilities");
|
||||
AbilitiesWindow->Asset = AbilityAsset;
|
||||
AbilitiesWindow->SetAsset(AbilityAsset);
|
||||
|
||||
UCogAbilityWindow_Attributes* AttributesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Attributes>("Gameplay.Attributes");
|
||||
AttributesWindow->Asset = AbilityAsset;
|
||||
AttributesWindow->SetAsset(AbilityAsset);
|
||||
|
||||
UCogAbilityWindow_Cheats* CheatsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Cheats>("Gameplay.Cheats");
|
||||
CheatsWindow->SetAsset(AbilityAsset);
|
||||
|
||||
UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Effects>("Gameplay.Effects");
|
||||
EffectsWindow->Asset = AbilityAsset;
|
||||
EffectsWindow->SetAsset(AbilityAsset);
|
||||
|
||||
UCogAbilityWindow_Pools* PoolsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Pools>("Gameplay.Pools");
|
||||
PoolsWindow->Asset = AbilityAsset;
|
||||
PoolsWindow->SetAsset(AbilityAsset);
|
||||
|
||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Tags>("Gameplay.Tags");
|
||||
|
||||
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||
TweaksWindow->Asset = AbilityAsset;
|
||||
TweaksWindow->SetAsset(AbilityAsset);
|
||||
|
||||
//---------------------------------------
|
||||
// Input
|
||||
@@ -192,10 +192,10 @@ void ACogSampleGameState::InitializeCog()
|
||||
const UCogInputDataAsset* InputAsset = GetFirstAssetByClass<UCogInputDataAsset>();
|
||||
|
||||
UCogInputWindow_Actions* ActionsWindow = CogWindowManager->CreateWindow<UCogInputWindow_Actions>("Input.Actions");
|
||||
ActionsWindow->Asset = InputAsset;
|
||||
ActionsWindow->SetAsset(InputAsset);
|
||||
|
||||
UCogInputWindow_Gamepad* GamepadWindow = CogWindowManager->CreateWindow<UCogInputWindow_Gamepad>("Input.Gamepad");
|
||||
GamepadWindow->Asset = InputAsset;
|
||||
GamepadWindow->SetAsset(InputAsset);
|
||||
|
||||
//---------------------------------------
|
||||
// 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