mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
Add spawning window
This commit is contained in:
@@ -107,6 +107,8 @@ ManualIPAddress=
|
||||
+Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ")
|
||||
+Profiles=(Name="CogSampleProfile",CollisionEnabled=QueryAndPhysics,bCanModify=True,ObjectTypeName="",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Sample cog profile")
|
||||
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False,Name="CogSampleChannel")
|
||||
+EditProfiles=(Name="Pawn",CustomResponses=((Channel="Camera",Response=ECR_Ignore)))
|
||||
+EditProfiles=(Name="CharacterMesh",CustomResponses=((Channel="Camera",Response=ECR_Ignore)))
|
||||
-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall")
|
||||
-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn")
|
||||
-ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
#include "CogAbilityDataAsset_Cheats.h"
|
||||
#include "CogDebugAllegianceInterface.h"
|
||||
#include "CogDebugDraw.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "EngineUtils.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "imgui.h"
|
||||
@@ -86,13 +87,7 @@ void UCogAbilityWindow_Cheats::AddCheat(AActor* CheatInstigator, AActor* Selecte
|
||||
Color = CheatsAsset->NeutralEffectColor;
|
||||
}
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(Color.R, Color.G, Color.B, 0.2f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(Color.R, Color.G, Color.B, 0.3f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(Color.R, Color.G, Color.B, 0.5f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, ImVec4(Color.R, Color.G, Color.B, 0.8f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(Color.R, Color.G, Color.B, 0.2f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(Color.R, Color.G, Color.B, 0.3f * Color.A));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(Color.R, Color.G, Color.B, 0.5f * Color.A));
|
||||
FCogWindowWidgets::PushBackColor(FCogImguiHelper::ToImVec4(Color));
|
||||
|
||||
if (IsPersistent)
|
||||
{
|
||||
@@ -124,7 +119,7 @@ void UCogAbilityWindow_Cheats::AddCheat(AActor* CheatInstigator, AActor* Selecte
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor(7);
|
||||
FCogWindowWidgets::PopBackColor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -126,11 +126,11 @@ static void DrawRow(const char* Title, float MitigatedValue, float UnmitigatedVa
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
static void DrawDamages(FCogDamageStats& Damage)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(150, 150, 150, 60));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(150, 150, 150, 80));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(150, 150, 150, 120));
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, IM_COL32(150, 150, 150, 200));
|
||||
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, IM_COL32(120, 120, 120, 255));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(150, 150, 150, 60));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(150, 150, 150, 80));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(150, 150, 150, 120));
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, IM_COL32(150, 150, 150, 200));
|
||||
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, IM_COL32(120, 120, 120, 255));
|
||||
|
||||
if (ImGui::BeginTable("Damages", 4, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize | ImGuiTableFlags_RowBg))
|
||||
{
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
void UCogAbilityWindow_Effects::PreRender(ImGuiWindowFlags& WindowFlags)
|
||||
{
|
||||
Super::PreRender(WindowFlags);
|
||||
|
||||
WindowFlags |= ImGuiWindowFlags_MenuBar;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -21,6 +19,12 @@ void UCogAbilityWindow_Effects::RenderContent()
|
||||
{
|
||||
Super::RenderContent();
|
||||
|
||||
RenderEffectsTable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::RenderEffectsTable()
|
||||
{
|
||||
UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(GetSelection(), true);
|
||||
if (AbilitySystemComponent == nullptr)
|
||||
{
|
||||
@@ -40,14 +44,14 @@ void UCogAbilityWindow_Effects::RenderContent()
|
||||
FGameplayEffectQuery Query;
|
||||
for (const FActiveGameplayEffectHandle& ActiveHandle : AbilitySystemComponent->GetActiveEffects(Query))
|
||||
{
|
||||
DrawEffectRow(*AbilitySystemComponent, ActiveHandle, Index, SelectedIndex);
|
||||
RenderEffectRow(*AbilitySystemComponent, ActiveHandle, Index, SelectedIndex);
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawEffectRow(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffectHandle& ActiveHandle, int32 Index, int32& Selected)
|
||||
void UCogAbilityWindow_Effects::RenderEffectRow(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffectHandle& ActiveHandle, int32 Index, int32& Selected)
|
||||
{
|
||||
ImGui::PushID(Index);
|
||||
|
||||
@@ -104,7 +108,7 @@ void UCogAbilityWindow_Effects::DrawEffectRow(const UAbilitySystemComponent& Abi
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
FCogWindowWidgets::BeginTableTooltip();
|
||||
DrawEffectInfo(AbilitySystemComponent, ActiveEffect, Effect);
|
||||
RenderEffectInfo(AbilitySystemComponent, ActiveEffect, Effect);
|
||||
FCogWindowWidgets::EndTableTooltip();
|
||||
}
|
||||
|
||||
@@ -113,7 +117,7 @@ void UCogAbilityWindow_Effects::DrawEffectRow(const UAbilitySystemComponent& Abi
|
||||
//------------------------
|
||||
if (ImGui::BeginPopupContextItem())
|
||||
{
|
||||
if (ImGui::Button("Open Properties"))
|
||||
if (ImGui::Button("Open"))
|
||||
{
|
||||
//GetOwner()->GetPropertyGrid()->Open(EffectPtr);
|
||||
ImGui::CloseCurrentPopup();
|
||||
@@ -125,26 +129,26 @@ void UCogAbilityWindow_Effects::DrawEffectRow(const UAbilitySystemComponent& Abi
|
||||
// Remaining Time
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
DrawRemainingTime(AbilitySystemComponent, ActiveEffect);
|
||||
RenderRemainingTime(AbilitySystemComponent, ActiveEffect);
|
||||
|
||||
//------------------------
|
||||
// Stacks
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
DrawStacks(ActiveEffect, Effect);
|
||||
RenderStacks(ActiveEffect, Effect);
|
||||
|
||||
//------------------------
|
||||
// Prediction
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
DrawPrediction(ActiveEffect, true);
|
||||
RenderPrediction(ActiveEffect, true);
|
||||
|
||||
ImGui::PopID();
|
||||
Index++;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect)
|
||||
void UCogAbilityWindow_Effects::RenderEffectInfo(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect)
|
||||
{
|
||||
if (ImGui::BeginTable("Effect", 2, ImGuiTableFlags_Borders))
|
||||
{
|
||||
@@ -178,7 +182,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Remaining Time");
|
||||
ImGui::TableNextColumn();
|
||||
DrawRemainingTime(AbilitySystemComponent, ActiveEffect);
|
||||
RenderRemainingTime(AbilitySystemComponent, ActiveEffect);
|
||||
|
||||
//------------------------
|
||||
// Period
|
||||
@@ -196,7 +200,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Stacks");
|
||||
ImGui::TableNextColumn();
|
||||
DrawStacks(ActiveEffect, Effect);
|
||||
RenderStacks(ActiveEffect, Effect);
|
||||
|
||||
//------------------------
|
||||
// Prediction
|
||||
@@ -205,7 +209,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Prediction");
|
||||
ImGui::TableNextColumn();
|
||||
DrawPrediction(ActiveEffect, false);
|
||||
RenderPrediction(ActiveEffect, false);
|
||||
|
||||
//------------------------
|
||||
// Dynamic Asset Tags
|
||||
@@ -214,7 +218,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Dynamic Asset Tags");
|
||||
ImGui::TableNextColumn();
|
||||
DrawTagContainer(ActiveEffect.Spec.GetDynamicAssetTags());
|
||||
RenderTagContainer(ActiveEffect.Spec.GetDynamicAssetTags());
|
||||
|
||||
//------------------------
|
||||
// All Asset Tags
|
||||
@@ -225,7 +229,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
FGameplayTagContainer AllAssetTagsContainer;
|
||||
ActiveEffect.Spec.GetAllAssetTags(AllAssetTagsContainer);
|
||||
DrawTagContainer(AllAssetTagsContainer);
|
||||
RenderTagContainer(AllAssetTagsContainer);
|
||||
|
||||
//------------------------
|
||||
// All Granted Tags
|
||||
@@ -236,7 +240,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
ImGui::TableNextColumn();
|
||||
FGameplayTagContainer AllGrantedTagsContainer;
|
||||
ActiveEffect.Spec.GetAllGrantedTags(AllGrantedTagsContainer);
|
||||
DrawTagContainer(AllGrantedTagsContainer);
|
||||
RenderTagContainer(AllGrantedTagsContainer);
|
||||
|
||||
//------------------------
|
||||
// Modifiers
|
||||
@@ -262,7 +266,7 @@ void UCogAbilityWindow_Effects::DrawEffectInfo(const UAbilitySystemComponent& Ab
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawTagContainer(const FGameplayTagContainer& Container)
|
||||
void UCogAbilityWindow_Effects::RenderTagContainer(const FGameplayTagContainer& Container)
|
||||
{
|
||||
TArray<FGameplayTag> GameplayTags;
|
||||
Container.GetGameplayTagArray(GameplayTags);
|
||||
@@ -280,7 +284,7 @@ FString UCogAbilityWindow_Effects::GetEffectName(const UGameplayEffect& Effect)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawRemainingTime(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect)
|
||||
void UCogAbilityWindow_Effects::RenderRemainingTime(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect)
|
||||
{
|
||||
float StartTime = ActiveEffect.StartWorldTime;
|
||||
float Duration = ActiveEffect.GetDuration();
|
||||
@@ -302,7 +306,7 @@ void UCogAbilityWindow_Effects::DrawRemainingTime(const UAbilitySystemComponent&
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawStacks(const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect)
|
||||
void UCogAbilityWindow_Effects::RenderStacks(const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect)
|
||||
{
|
||||
const int32 CurrentStackCount = ActiveEffect.Spec.StackCount;
|
||||
if (Effect.StackLimitCount <= 0)
|
||||
@@ -320,7 +324,7 @@ void UCogAbilityWindow_Effects::DrawStacks(const FActiveGameplayEffect& ActiveEf
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Effects::DrawPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short)
|
||||
void UCogAbilityWindow_Effects::RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short)
|
||||
{
|
||||
FString PredictionString;
|
||||
if (ActiveEffect.PredictionKey.IsValidKey())
|
||||
|
||||
@@ -22,20 +22,12 @@ void DrawTweak(ACogAbilityReplicator* Replicator, const UCogAbilityDataAsset_Twe
|
||||
}
|
||||
|
||||
const FCogAbilityTweakCategory& Category = TweaksAsset->TweaksCategories[TweakCategoryIndex];
|
||||
const FLinearColor& Color = Category.Color;
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(Color.R, Color.G, Color.B, Color.A * 0.25f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(Color.R, Color.G, Color.B, Color.A * 0.3f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(Color.R, Color.G, Color.B, Color.A * 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImVec4(Color.R, Color.G, Color.B, Color.A * 0.8f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, ImVec4(Color.R, Color.G, Color.B, Color.A * 1.0f));
|
||||
|
||||
|
||||
FCogWindowWidgets::PushBackColor(FCogImguiHelper::ToImVec4(Category.Color));
|
||||
ImGui::PushItemWidth(-1);
|
||||
ImGui::SliderFloat("##Value", Value, TweaksAsset->TweakMinValue, TweaksAsset->TweakMaxValue, "%+0.0f%%", 1.0f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::PopStyleColor(5);
|
||||
FCogWindowWidgets::PopBackColor();
|
||||
|
||||
bool bUpdateValue = ImGui::IsItemDeactivatedAfterEdit();
|
||||
|
||||
|
||||
@@ -22,17 +22,19 @@ protected:
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
virtual void DrawEffectRow(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffectHandle& ActiveHandle, int32 Index, int32& Selected);
|
||||
virtual void RenderEffectsTable();
|
||||
|
||||
virtual void DrawEffectInfo(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect);
|
||||
virtual void RenderEffectRow(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffectHandle& ActiveHandle, int32 Index, int32& Selected);
|
||||
|
||||
virtual void RenderEffectInfo(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect);
|
||||
|
||||
virtual void DrawTagContainer(const FGameplayTagContainer& Container);
|
||||
virtual void RenderTagContainer(const FGameplayTagContainer& Container);
|
||||
|
||||
virtual void RenderRemainingTime(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect);
|
||||
|
||||
virtual void RenderStacks(const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect);
|
||||
|
||||
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||
|
||||
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
||||
|
||||
virtual void DrawRemainingTime(const UAbilitySystemComponent& AbilitySystemComponent, const FActiveGameplayEffect& ActiveEffect);
|
||||
|
||||
virtual void DrawStacks(const FActiveGameplayEffect& ActiveEffect, const UGameplayEffect& Effect);
|
||||
|
||||
virtual void DrawPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||
};
|
||||
|
||||
@@ -22,12 +22,6 @@ ACogEngineReplicator::ACogEngineReplicator(const FObjectInitializer& ObjectIniti
|
||||
{
|
||||
#if !UE_BUILD_SHIPPING
|
||||
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
PrimaryActorTick.bAllowTickOnDedicatedServer = true;
|
||||
PrimaryActorTick.bTickEvenWhenPaused = true;
|
||||
PrimaryActorTick.bStartWithTickEnabled = true;
|
||||
PrimaryActorTick.TickGroup = TG_PrePhysics;
|
||||
|
||||
bHasAuthority = false;
|
||||
bIsLocal = false;
|
||||
bReplicates = true;
|
||||
@@ -65,26 +59,42 @@ void ACogEngineReplicator::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>&
|
||||
{
|
||||
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
||||
|
||||
#if !UE_BUILD_SHIPPING
|
||||
|
||||
FDoRepLifetimeParams Params;
|
||||
Params.bIsPushBased = true;
|
||||
|
||||
DOREPLIFETIME_WITH_PARAMS_FAST(ACogEngineReplicator, TimeDilation, Params);
|
||||
|
||||
#endif // !UE_BUILD_SHIPPING
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void ACogEngineReplicator::TickSpawnActions()
|
||||
void ACogEngineReplicator::Server_Spawn_Implementation(const FCogEngineSpawnEntry& SpawnEntry)
|
||||
{
|
||||
#if !UE_BUILD_SHIPPING
|
||||
|
||||
if (OwnerPlayerController == nullptr)
|
||||
if (GetWorld() == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (int32 i = SpawnActions.Num() - 1; i >= 0; --i)
|
||||
if (SpawnFunction)
|
||||
{
|
||||
const FCogEngineReplicatorSpawnAction& SpawnInfo = SpawnActions[i];
|
||||
SpawnActions.RemoveAt(i);
|
||||
SpawnFunction(SpawnEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
FTransform Transform(FTransform::Identity);
|
||||
if (APawn* Pawn = GetPlayerController()->GetPawn())
|
||||
{
|
||||
Transform = Pawn->GetTransform();
|
||||
Transform.SetLocation(Transform.GetLocation() + Transform.GetUnitAxis(EAxis::X) * 200.0f);
|
||||
Transform.SetScale3D(FVector(1.0f));
|
||||
}
|
||||
|
||||
FActorSpawnParameters Params;
|
||||
Params.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;
|
||||
GetWorld()->SpawnActor(SpawnEntry.Class, &Transform, Params);
|
||||
}
|
||||
|
||||
#endif // !UE_BUILD_SHIPPING
|
||||
@@ -118,3 +128,4 @@ void ACogEngineReplicator::OnRep_TimeDilation()
|
||||
|
||||
#endif // !UE_BUILD_SHIPPING
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "CogEngineWindow_Spawn.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Spawn::PreRender(ImGuiWindowFlags& WindowFlags)
|
||||
{
|
||||
Super::PreRender(WindowFlags);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Spawn::RenderContent()
|
||||
{
|
||||
Super::RenderContent();
|
||||
|
||||
if (Asset == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (const FCogEngineSpawnGroup& SpawnGroup : Asset->SpawnGroups)
|
||||
{
|
||||
RenderSpawnGroup(SpawnGroup);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogEngineWindow_Spawn::RenderSpawnGroup(const FCogEngineSpawnGroup& SpawnGroup)
|
||||
{
|
||||
int32 GroupIndex = 0;
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Header, IM_COL32(66, 66, 66, 79));
|
||||
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, IM_COL32(62, 62, 62, 204));
|
||||
ImGui::PushStyleColor(ImGuiCol_HeaderActive, IM_COL32(86, 86, 86, 255));
|
||||
|
||||
if (ImGui::CollapsingHeader(TCHAR_TO_ANSI(*SpawnGroup.Name), ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::PushID(GroupIndex);
|
||||
|
||||
const bool PushColor = (SpawnGroup.Color != FColor::Transparent);
|
||||
if (PushColor)
|
||||
{
|
||||
FCogWindowWidgets::PushBackColor(FCogImguiHelper::ToImVec4(SpawnGroup.Color));
|
||||
}
|
||||
|
||||
static int32 SelectedAssetIndex = -1;
|
||||
int32 AssetIndex = 0;
|
||||
|
||||
for (const FCogEngineSpawnEntry& SpawnEntry : SpawnGroup.Spawns)
|
||||
{
|
||||
if (RenderSpawnAsset(SpawnEntry, SelectedAssetIndex == GroupIndex))
|
||||
{
|
||||
SelectedAssetIndex = AssetIndex;
|
||||
}
|
||||
|
||||
AssetIndex++;
|
||||
}
|
||||
|
||||
if (PushColor)
|
||||
{
|
||||
FCogWindowWidgets::PopBackColor();
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
GroupIndex++;
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor(3);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
bool UCogEngineWindow_Spawn::RenderSpawnAsset(const FCogEngineSpawnEntry& SpawnEntry, bool IsLastSelected)
|
||||
{
|
||||
bool IsPressed = false;
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, IsLastSelected ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.5f));
|
||||
|
||||
FString EntryName;
|
||||
if (SpawnEntry.Asset != nullptr)
|
||||
{
|
||||
EntryName = SpawnEntry.Asset->GetName();
|
||||
}
|
||||
else
|
||||
{
|
||||
EntryName = GetNameSafe(SpawnEntry.Class);
|
||||
}
|
||||
|
||||
if (ImGui::Button(TCHAR_TO_ANSI(*EntryName), ImVec2(-1, 0)))
|
||||
{
|
||||
if (ACogEngineReplicator* Replicator = FCogEngineModule::Get().GetLocalReplicator())
|
||||
{
|
||||
Replicator->Server_Spawn(SpawnEntry);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar(1);
|
||||
ImGui::PopStyleColor(1);
|
||||
|
||||
return IsPressed;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Engine/DataAsset.h"
|
||||
#include "CogEngineDataAsset_Spawns.generated.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
USTRUCT()
|
||||
struct COGENGINE_API FCogEngineSpawnEntry
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
TSubclassOf<AActor> Class;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
TObjectPtr<const UObject> Asset = nullptr;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
USTRUCT()
|
||||
struct COGENGINE_API FCogEngineSpawnGroup
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
FString Name;
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
FLinearColor Color = FLinearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
||||
|
||||
UPROPERTY(EditAnywhere)
|
||||
TArray<FCogEngineSpawnEntry> Spawns;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Blueprintable)
|
||||
class COGENGINE_API UCogEngineDataAsset_Spawns : public UPrimaryDataAsset
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(EditAnywhere, meta = (TitleProperty = "Name"))
|
||||
TArray<FCogEngineSpawnGroup> SpawnGroups;
|
||||
};
|
||||
@@ -8,15 +8,7 @@
|
||||
|
||||
class APlayerController;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
USTRUCT()
|
||||
struct FCogEngineReplicatorSpawnAction
|
||||
{
|
||||
GENERATED_USTRUCT_BODY()
|
||||
|
||||
bool Control = false;
|
||||
bool Select = false;
|
||||
};
|
||||
using FCogEnineSpawnFunction = TFunction<void(const FCogEngineSpawnEntry& SpawnEntry)>;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(NotBlueprintable, NotBlueprintType, notplaceable, noteditinlinenew, hidedropdown, Transient)
|
||||
@@ -31,30 +23,32 @@ public:
|
||||
|
||||
APlayerController* GetPlayerController() const { return OwnerPlayerController.Get(); }
|
||||
|
||||
bool IsLocal() const { return bIsLocal; }
|
||||
FCogEnineSpawnFunction GetSpawnFunction() const { return SpawnFunction; }
|
||||
|
||||
void SetSpawnFunction(FCogEnineSpawnFunction Value) { SpawnFunction = Value; }
|
||||
|
||||
UFUNCTION(Server, Reliable)
|
||||
void Server_Spawn(const FCogEngineSpawnEntry& SpawnEntry);
|
||||
|
||||
float GetTimeDilation() const { return TimeDilation; }
|
||||
|
||||
UFUNCTION(Server, Reliable)
|
||||
void Server_SetTimeDilation(float Value);
|
||||
|
||||
float GetTimeDilation() const { return TimeDilation; }
|
||||
|
||||
protected:
|
||||
|
||||
void TickSpawnActions();
|
||||
|
||||
UFUNCTION()
|
||||
void OnRep_TimeDilation();
|
||||
|
||||
UPROPERTY()
|
||||
TArray<FCogEngineReplicatorSpawnAction> SpawnActions;
|
||||
|
||||
TObjectPtr<APlayerController> OwnerPlayerController;
|
||||
|
||||
uint32 bHasAuthority : 1;
|
||||
uint32 bIsLocal : 1;
|
||||
|
||||
private:
|
||||
|
||||
UPROPERTY(ReplicatedUsing = OnRep_TimeDilation)
|
||||
float TimeDilation = 1.0f;
|
||||
|
||||
FCogEnineSpawnFunction SpawnFunction;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogEngineWindow_Spawn.generated.h"
|
||||
|
||||
class UCogEngineDataAsset_Spawns;
|
||||
struct FCogEngineSpawnGroup;
|
||||
|
||||
UCLASS()
|
||||
class COGENGINE_API UCogEngineWindow_Spawn : public UCogWindow
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
const UCogEngineDataAsset_Spawns* GetSpawnsAsset() const { return Asset; }
|
||||
|
||||
void SetSpawnsAsset(const UCogEngineDataAsset_Spawns* Value) { Asset = Value; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void PreRender(ImGuiWindowFlags& WindowFlags) override;
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
virtual void RenderSpawnGroup(const FCogEngineSpawnGroup& SpawnGroup);
|
||||
|
||||
virtual bool RenderSpawnAsset(const FCogEngineSpawnEntry& SpawnEntry, bool IsLastSelected);
|
||||
|
||||
private:
|
||||
|
||||
const UCogEngineDataAsset_Spawns* Asset = nullptr;
|
||||
};
|
||||
@@ -37,7 +37,7 @@ void FCogImguiModule::Initialize()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TSharedPtr<SCogImguiWidget> FCogImguiModule::CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRender Render, ImFontAtlas* FontAtlas /*= nullptr*/)
|
||||
TSharedPtr<SCogImguiWidget> FCogImguiModule::CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRenderFunction Render, ImFontAtlas* FontAtlas /*= nullptr*/)
|
||||
{
|
||||
if (bIsInitialized == false)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
virtual void ShutdownModule() override;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
TSharedPtr<SCogImguiWidget> CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRender Render, ImFontAtlas* FontAtlas = nullptr);
|
||||
TSharedPtr<SCogImguiWidget> CreateImGuiViewport(UGameViewportClient* GameViewport, FCogImguiRenderFunction Render, ImFontAtlas* FontAtlas = nullptr);
|
||||
|
||||
FCogImguiTextureManager& GetTextureManager() { return TextureManager; }
|
||||
ImFontAtlas& GetDefaultFontAtlas() { return DefaultFontAtlas; }
|
||||
|
||||
@@ -13,7 +13,7 @@ struct ImFontAtlas;
|
||||
struct ImGuiContext;
|
||||
struct ImPlotContext;
|
||||
|
||||
using FCogImguiRender = TFunction<void(float DeltaTime)>;
|
||||
using FCogImguiRenderFunction = TFunction<void(float DeltaTime)>;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
class COGIMGUI_API SCogImguiWidget : public SCompoundWidget
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
SLATE_BEGIN_ARGS(SCogImguiWidget) {}
|
||||
SLATE_ARGUMENT(UGameViewportClient*, GameViewport)
|
||||
SLATE_ARGUMENT(ImFontAtlas*, FontAtlas)
|
||||
SLATE_ARGUMENT(FCogImguiRender, Render)
|
||||
SLATE_ARGUMENT(FCogImguiRenderFunction, Render)
|
||||
SLATE_END_ARGS()
|
||||
|
||||
void Construct(const FArguments& InArgs);
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
|
||||
ImPlotContext* ImPlotContext = nullptr;
|
||||
|
||||
FCogImguiRender Render;
|
||||
FCogImguiRenderFunction Render;
|
||||
|
||||
float DpiScale = 1.f;
|
||||
|
||||
|
||||
@@ -266,6 +266,15 @@ void UCogWindowManager::DrawMainMenu()
|
||||
}
|
||||
FCogWindowWidgets::PopStyleCompact();
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted("Change DPi Scale [Mouse Wheel]");
|
||||
ImGui::TextUnformatted("Reset DPi Scale [Middle Mouse]");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -178,4 +178,22 @@ void FCogWindowWidgets::MenuSearchBar(ImGuiTextFilter& Filter)
|
||||
ImGui::SetCursorPosX(Pos2);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogWindowWidgets::PushBackColor(const ImVec4& Color)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.25f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.3f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.25f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.3f));
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.5f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.8f));
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, ImVec4(Color.x, Color.y, Color.z, Color.w * 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, ImVec4(Color.x, Color.y, Color.z, Color.w * 0.8f));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogWindowWidgets::PopBackColor()
|
||||
{
|
||||
ImGui::PopStyleColor(9);
|
||||
}
|
||||
@@ -30,4 +30,8 @@ public:
|
||||
static float TextBaseHeight;
|
||||
|
||||
static void MenuSearchBar(ImGuiTextFilter& Filter);
|
||||
|
||||
static void PushBackColor(const ImVec4& Color);
|
||||
|
||||
static void PopBackColor();
|
||||
};
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "CogDebugDefines.h"
|
||||
#include "CogDebugPlot.h"
|
||||
#include "CogEngineDataAsset_Collisions.h"
|
||||
#include "CogEngineDataAsset_Spawns.h"
|
||||
#include "CogEngineModule.h"
|
||||
#include "CogEngineWindow_Collisions.h"
|
||||
#include "CogEngineWindow_DebugSettings.h"
|
||||
@@ -36,6 +37,7 @@
|
||||
#include "CogEngineWindow_Scalability.h"
|
||||
#include "CogEngineWindow_Selection.h"
|
||||
#include "CogEngineWindow_Skeleton.h"
|
||||
#include "CogEngineWindow_Spawn.h"
|
||||
#include "CogEngineWindow_Stats.h"
|
||||
#include "CogEngineWindow_Time.h"
|
||||
#include "CogImguiModule.h"
|
||||
@@ -143,20 +145,30 @@ void ACogSampleGameState::InitializeCog()
|
||||
//---------------------------------------
|
||||
// Engine
|
||||
//---------------------------------------
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_DebugSettings>("Engine.Debug Settings");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_ImGui>("Engine.ImGui");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_LogCategories>("Engine.Log Categories");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_NetEmulation>("Engine.Net Emulation");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_OutputLog>("Engine.Output Log");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Plots>("Engine.Plots");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Scalability>("Engine.Scalability");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Skeleton>("Engine.Skeleton");
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Time>("Engine.Time");
|
||||
UCogEngineWindow_Stats* StatsWindow = CogWindowManager->CreateWindow<UCogEngineWindow_Stats>("Engine.Stats");
|
||||
UCogEngineWindow_Collisions* CollisionsWindow = CogWindowManager->CreateWindow<UCogEngineWindow_Collisions>("Engine.Collision");
|
||||
CollisionsWindow->SetCollisionsAsset(GetFirstAssetByClass<UCogEngineDataAsset_Collisions>());
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_DebugSettings>("Engine.Debug Settings");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_ImGui>("Engine.ImGui");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_LogCategories>("Engine.Log Categories");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_NetEmulation>("Engine.Net Emulation");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_OutputLog>("Engine.Output Log");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Plots>("Engine.Plots");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Scalability>("Engine.Scalability");
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Skeleton>("Engine.Skeleton");
|
||||
|
||||
UCogEngineWindow_Spawn* SpawnWindow =CogWindowManager->CreateWindow<UCogEngineWindow_Spawn>("Engine.Spawn");
|
||||
SpawnWindow->SetSpawnsAsset(GetFirstAssetByClass<UCogEngineDataAsset_Spawns>());
|
||||
|
||||
CogWindowManager->CreateWindow<UCogEngineWindow_Time>("Engine.Time");
|
||||
|
||||
//---------------------------------------
|
||||
// Selection
|
||||
//---------------------------------------
|
||||
UCogEngineWindow_Selection* SelectionWindow = CogWindowManager->CreateWindow<UCogEngineWindow_Selection>("Engine.Selection");
|
||||
TArray<TSubclassOf<AActor>> SubClasses
|
||||
{
|
||||
@@ -169,23 +181,7 @@ void ACogSampleGameState::InitializeCog()
|
||||
SelectionWindow->SetCurrentActorSubClass(ACharacter::StaticClass());
|
||||
SelectionWindow->SetTraceType(UEngineTypes::ConvertToTraceType(ECollisionChannel::ECC_Pawn));
|
||||
|
||||
//---------------------------------------
|
||||
// Collision
|
||||
//---------------------------------------
|
||||
UCogEngineWindow_Collisions* CollisionsWindow = CogWindowManager->CreateWindow<UCogEngineWindow_Collisions>("Engine.Collision");
|
||||
CollisionsWindow->SetCollisionsAsset(GetFirstAssetByClass<UCogEngineDataAsset_Collisions>());
|
||||
|
||||
//---------------------------------------
|
||||
// Attributes
|
||||
//---------------------------------------
|
||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Attributes>("Gameplay.Attributes");
|
||||
|
||||
//---------------------------------------
|
||||
// Effects
|
||||
//---------------------------------------
|
||||
UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Effects>("Gameplay.Effects");
|
||||
EffectsWindow->NegativeEffectTag = Tag_Effect_Alignment_Negative;
|
||||
EffectsWindow->PositiveEffectTag = Tag_Effect_Alignment_Positive;
|
||||
UCogEngineWindow_Stats* StatsWindow = CogWindowManager->CreateWindow<UCogEngineWindow_Stats>("Engine.Stats");
|
||||
|
||||
//---------------------------------------
|
||||
// Abilities
|
||||
@@ -193,43 +189,31 @@ void ACogSampleGameState::InitializeCog()
|
||||
UCogAbilityWindow_Abilities* AbilitiesWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Abilities>("Gameplay.Abilities");
|
||||
AbilitiesWindow->AbilitiesAsset = GetFirstAssetByClass<UCogAbilityDataAsset_Abilities>();
|
||||
|
||||
//---------------------------------------
|
||||
// Cheats
|
||||
//---------------------------------------
|
||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Attributes>("Gameplay.Attributes");
|
||||
|
||||
UCogAbilityWindow_Cheats* CheatsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Cheats>("Gameplay.Cheats");
|
||||
CheatsWindow->CheatsAsset = GetFirstAssetByClass<UCogAbilityDataAsset_Cheats>();
|
||||
|
||||
//---------------------------------------
|
||||
// Tweaks
|
||||
//---------------------------------------
|
||||
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||
TweaksWindow->TweaksAsset = GetFirstAssetByClass<UCogAbilityDataAsset_Tweaks>();
|
||||
|
||||
//---------------------------------------
|
||||
// Damages
|
||||
//---------------------------------------
|
||||
|
||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Damages>("Gameplay.Damages");
|
||||
|
||||
//---------------------------------------
|
||||
// Tags
|
||||
//---------------------------------------
|
||||
UCogAbilityWindow_Tags* TagsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tags>("Gameplay.Tags");
|
||||
UCogAbilityWindow_Effects* EffectsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Effects>("Gameplay.Effects");
|
||||
EffectsWindow->NegativeEffectTag = Tag_Effect_Alignment_Negative;
|
||||
EffectsWindow->PositiveEffectTag = Tag_Effect_Alignment_Positive;
|
||||
|
||||
//---------------------------------------
|
||||
// Pools
|
||||
//---------------------------------------
|
||||
UCogAbilityWindow_Pools* PoolsWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Pools>("Gameplay.Pools");
|
||||
PoolsWindow->PoolsAsset = GetFirstAssetByClass<UCogAbilityDataAsset_Pools>();
|
||||
|
||||
CogWindowManager->CreateWindow<UCogAbilityWindow_Tags>("Gameplay.Tags");
|
||||
|
||||
UCogAbilityWindow_Tweaks* TweaksWindow = CogWindowManager->CreateWindow<UCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||
TweaksWindow->TweaksAsset = GetFirstAssetByClass<UCogAbilityDataAsset_Tweaks>();
|
||||
|
||||
//---------------------------------------
|
||||
// Input Actions
|
||||
// Input
|
||||
//---------------------------------------
|
||||
UCogInputWindow_Actions* ActionsWindow = CogWindowManager->CreateWindow<UCogInputWindow_Actions>("Input.Actions");
|
||||
ActionsWindow->ActionsAsset = GetFirstAssetByClass<UCogInputDataAsset_Actions>();
|
||||
|
||||
//---------------------------------------
|
||||
// Gamepad
|
||||
//---------------------------------------
|
||||
UCogInputWindow_Gamepad* GamepadWindow = CogWindowManager->CreateWindow<UCogInputWindow_Gamepad>("Input.Gamepad");
|
||||
GamepadWindow->ActionsAsset = GetFirstAssetByClass<UCogInputDataAsset_Actions>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user