mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-04 14:48:45 +00:00
Merge remote-tracking branch 'arnaud-jamin/main'
# Conflicts: # Plugins/Cog/Source/CogCommon/Public/CogCommonLogCategory.h
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnrealBuildTool;
|
||||
using UnrealBuildTool.Rules;
|
||||
|
||||
public class CogAbility : ModuleRules
|
||||
{
|
||||
@@ -37,6 +38,7 @@ public class CogAbility : ModuleRules
|
||||
new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"GameplayTasks",
|
||||
"Engine",
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "CogAbilityHelper.h"
|
||||
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "GameplayTagContainer.h"
|
||||
#include "imgui.h"
|
||||
|
||||
@@ -12,12 +13,47 @@ FString FCogAbilityHelper::CleanupName(FString Str)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityHelper::RenderTagContainer(const FGameplayTagContainer& Container)
|
||||
void FCogAbilityHelper::RenderTagContainer(const FGameplayTagContainer& Container, const bool Inline, const ImVec4& Color)
|
||||
{
|
||||
TArray<FGameplayTag> GameplayTags;
|
||||
Container.GetGameplayTagArray(GameplayTags);
|
||||
for (FGameplayTag Tag : GameplayTags)
|
||||
for (const FGameplayTag& Tag : GameplayTags)
|
||||
{
|
||||
ImGui::Text("%s", TCHAR_TO_ANSI(*Tag.ToString()));
|
||||
FCogWindowWidgets::SmallButton(StringCast<ANSICHAR>(*Tag.ToString()).Get(), Color);
|
||||
if (Inline)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityHelper::RenderTagContainer(
|
||||
const FGameplayTagContainer& ContainerTags,
|
||||
const FGameplayTagContainer& TagsToMatch,
|
||||
const bool InverseMatch,
|
||||
const bool OnlyShowMatches,
|
||||
const bool Inline,
|
||||
const ImVec4& NormalColor,
|
||||
const ImVec4& MatchColor)
|
||||
{
|
||||
TArray<FGameplayTag> Tags;
|
||||
ContainerTags.GetGameplayTagArray(Tags);
|
||||
|
||||
for (const FGameplayTag& Tag : Tags)
|
||||
{
|
||||
bool hasTag = TagsToMatch.HasTag(Tag);
|
||||
hasTag = InverseMatch ? !hasTag : hasTag;
|
||||
|
||||
if (OnlyShowMatches && hasTag == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const ImVec4 Color = hasTag ? MatchColor : NormalColor;
|
||||
FCogWindowWidgets::SmallButton(StringCast<ANSICHAR>(*Tag.ToString()).Get(), Color);
|
||||
if (Inline)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,12 @@
|
||||
#include "CogAbilityReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "CogDebugRob.h"
|
||||
#include "imgui.h"
|
||||
|
||||
DEFINE_PRIVATE_ACCESSOR_VARIABLE(GameplayAbility_ActivationBlockedTags, UGameplayAbility, FGameplayTagContainer, ActivationBlockedTags);
|
||||
DEFINE_PRIVATE_ACCESSOR_VARIABLE(GameplayAbility_ActivationRequiredTags, UGameplayAbility, FGameplayTagContainer, ActivationRequiredTags);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::Initialize()
|
||||
{
|
||||
@@ -41,9 +45,9 @@ void FCogAbilityWindow_Abilities::ResetConfig()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderTick(float DetlaTime)
|
||||
void FCogAbilityWindow_Abilities::RenderTick(float DeltaTime)
|
||||
{
|
||||
Super::RenderTick(DetlaTime);
|
||||
Super::RenderTick(DeltaTime);
|
||||
|
||||
RenderOpenAbilities();
|
||||
}
|
||||
@@ -112,13 +116,13 @@ void FCogAbilityWindow_Abilities::RenderContent()
|
||||
return;
|
||||
}
|
||||
|
||||
RenderAbiltiesMenu(Selection);
|
||||
RenderAbilitiesMenu(Selection);
|
||||
|
||||
RenderAbilitiesTable(*AbilitySystemComponent);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbiltiesMenu(AActor* Selection)
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesMenu(AActor* Selection)
|
||||
{
|
||||
if (ImGui::BeginMenuBar())
|
||||
{
|
||||
@@ -151,16 +155,11 @@ void FCogAbilityWindow_Abilities::RenderAbiltiesMenu(AActor* Selection)
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Checkbox("Sort by Name", &Config->SortByName);
|
||||
ImGui::Checkbox("Show Active", &Config->ShowActive);
|
||||
ImGui::Checkbox("Show Inactive", &Config->ShowInactive);
|
||||
ImGui::Checkbox("Show Blocked", &Config->ShowBlocked);
|
||||
RenderAbilitiesMenuFilters();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::ColorEdit4("Active Color", (float*)&Config->ActiveColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Inactive Color", (float*)&Config->InactiveColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Blocked Color", (float*)&Config->BlockedColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
RenderAbilitiesMenuColorSettings();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@@ -178,6 +177,83 @@ void FCogAbilityWindow_Abilities::RenderAbiltiesMenu(AActor* Selection)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesMenuFilters()
|
||||
{
|
||||
ImGui::Checkbox("Sort by Name", &Config->SortByName);
|
||||
ImGui::Checkbox("Show Active", &Config->ShowActive);
|
||||
ImGui::Checkbox("Show Inactive", &Config->ShowInactive);
|
||||
ImGui::Checkbox("Show Pressed", &Config->ShowPressed);
|
||||
ImGui::Checkbox("Show Blocked", &Config->ShowBlocked);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesMenuColorSettings()
|
||||
{
|
||||
ImGui::ColorEdit4("Active Color", (float*)&Config->ActiveAbilityColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Inactive Color", (float*)&Config->InactiveAbilityColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Blocked Color", (float*)&Config->BlockedAbilityColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Default Tag Color", (float*)&Config->DefaultTagsColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Blocked Tag Color", (float*)&Config->BlockedTagsColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Input Pressed Color", (float*)&Config->InputPressedColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityActivation(FGameplayAbilitySpec& Spec)
|
||||
{
|
||||
FCogWindowWidgets::PushStyleCompact();
|
||||
bool IsActive = Spec.IsActive();
|
||||
if (ImGui::Checkbox("##Activation", &IsActive))
|
||||
{
|
||||
AbilityHandleToActivate = Spec.Handle;
|
||||
}
|
||||
FCogWindowWidgets::PopStyleCompact();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesTableAbilityName(UAbilitySystemComponent& AbilitySystemComponent, int& SelectedIndex, int Index, FGameplayAbilitySpec& Spec, UGameplayAbility* Ability)
|
||||
{
|
||||
const ImVec4 Color = GetAbilityColor(AbilitySystemComponent, Spec);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, Color);
|
||||
|
||||
if (ImGui::Selectable(TCHAR_TO_ANSI(*GetAbilityName(Ability)), SelectedIndex == Index, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick))
|
||||
{
|
||||
SelectedIndex = Index;
|
||||
|
||||
if (ImGui::IsMouseDoubleClicked(0))
|
||||
{
|
||||
OpenAbility(Spec.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor(1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesTableAbilityBlocking(UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility* Ability)
|
||||
{
|
||||
if (Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent) == false)
|
||||
{
|
||||
FGameplayTagContainer OwnedGameplayTags;
|
||||
AbilitySystemComponent.GetOwnedGameplayTags(OwnedGameplayTags);
|
||||
|
||||
if (const FGameplayTagContainer* ActivationBlockedTags = &PRIVATE_ACCESS_PTR(Ability, GameplayAbility_ActivationBlockedTags))
|
||||
{
|
||||
FGameplayTagContainer AllBlockingTags;
|
||||
AbilitySystemComponent.GetBlockedAbilityTags(AllBlockingTags);
|
||||
AllBlockingTags.AppendTags(OwnedGameplayTags);
|
||||
|
||||
FCogAbilityHelper::RenderTagContainer(*ActivationBlockedTags, AllBlockingTags, false, true, true, ImVec4(0, 0, 0, 0), FCogImguiHelper::ToImVec4(Config->BlockedTagsColor));
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (const FGameplayTagContainer* ActivationRequiredTags = &PRIVATE_ACCESS_PTR(Ability, GameplayAbility_ActivationRequiredTags))
|
||||
{
|
||||
FCogAbilityHelper::RenderTagContainer(*ActivationRequiredTags, OwnedGameplayTags, true, true, true, ImVec4(0, 0, 0, 0), FCogImguiHelper::ToImVec4(Config->BlockedTagsColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent& AbilitySystemComponent)
|
||||
{
|
||||
@@ -185,7 +261,7 @@ void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
|
||||
TArray<FGameplayAbilitySpec> FitleredAbilities;
|
||||
|
||||
for (FGameplayAbilitySpec& Spec: Abilities)
|
||||
for (FGameplayAbilitySpec& Spec : Abilities)
|
||||
{
|
||||
const UGameplayAbility* Ability = Spec.GetPrimaryInstance();
|
||||
if (Ability == nullptr)
|
||||
@@ -193,24 +269,10 @@ void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
Ability = Spec.Ability;
|
||||
}
|
||||
|
||||
const bool IsJustBlocked = Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent) == false;
|
||||
const bool IsJustActive = Spec.IsActive() && IsJustBlocked == false;
|
||||
const bool IsJustInactive = Spec.IsActive() == false && IsJustBlocked == false;
|
||||
|
||||
if (Config->ShowBlocked == false && IsJustBlocked)
|
||||
if (ShouldShowAbility(AbilitySystemComponent, Spec, Ability) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowActive == false && IsJustActive)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowInactive == false && IsJustInactive)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto AbilityName = StringCast<ANSICHAR>(*GetAbilityName(Ability));
|
||||
if (Filter.PassFilter(AbilityName.Get()) == false)
|
||||
@@ -229,24 +291,8 @@ void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
});
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("Abilities", 6, ImGuiTableFlags_SizingFixedFit
|
||||
| ImGuiTableFlags_Resizable
|
||||
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
||||
| ImGuiTableFlags_ScrollY
|
||||
| ImGuiTableFlags_RowBg
|
||||
| ImGuiTableFlags_BordersV
|
||||
| ImGuiTableFlags_Reorderable
|
||||
| ImGuiTableFlags_Hideable))
|
||||
if (RenderAbilitiesTableHeader(AbilitySystemComponent))
|
||||
{
|
||||
ImGui::TableSetupColumn("##Activation", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupScrollFreeze(0, 1);
|
||||
ImGui::TableSetupColumn("Ability");
|
||||
ImGui::TableSetupColumn("Level");
|
||||
ImGui::TableSetupColumn("Input");
|
||||
ImGui::TableSetupColumn("Cooldown");
|
||||
ImGui::TableSetupColumn("Blocked");
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
static int SelectedIndex = -1;
|
||||
int Index = 0;
|
||||
|
||||
@@ -262,83 +308,7 @@ void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
|
||||
ImGui::PushID(Index);
|
||||
|
||||
const ImVec4 Color = GetAbilityColor(AbilitySystemComponent, Spec);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, Color);
|
||||
|
||||
//------------------------
|
||||
// Activation
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
FCogWindowWidgets::PushStyleCompact();
|
||||
bool IsActive = Spec.IsActive();
|
||||
if (ImGui::Checkbox("##Activation", &IsActive))
|
||||
{
|
||||
AbilityHandleToActivate = Spec.Handle;
|
||||
}
|
||||
FCogWindowWidgets::PopStyleCompact();
|
||||
|
||||
//------------------------
|
||||
// Name
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (ImGui::Selectable(TCHAR_TO_ANSI(*GetAbilityName(Ability)), SelectedIndex == Index, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick))
|
||||
{
|
||||
SelectedIndex = Index;
|
||||
|
||||
if (ImGui::IsMouseDoubleClicked(0))
|
||||
{
|
||||
OpenAbility(Spec.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor(1);
|
||||
|
||||
//------------------------
|
||||
// Popup
|
||||
//------------------------
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
FCogWindowWidgets::BeginTableTooltip();
|
||||
RenderAbilityInfo(AbilitySystemComponent, Spec);
|
||||
FCogWindowWidgets::EndTableTooltip();
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// ContextMenu
|
||||
//------------------------
|
||||
RenderAbilityContextMenu(AbilitySystemComponent, Spec, Index);
|
||||
|
||||
//------------------------
|
||||
// Level
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", Spec.Level);
|
||||
|
||||
//------------------------
|
||||
// InputPressed
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
if (Spec.InputPressed > 0)
|
||||
{
|
||||
ImGui::Text("%d", Spec.InputPressed);
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// Cooldown
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilityCooldown(AbilitySystemComponent, *Ability);
|
||||
|
||||
//------------------------
|
||||
// Blocked
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
const bool IsBlocked = Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent) == false;
|
||||
if (IsBlocked)
|
||||
{
|
||||
ImGui::Text("Blocked");
|
||||
}
|
||||
RenderAbilitiesTableRow(AbilitySystemComponent, SelectedIndex, Index, Spec, Ability);
|
||||
|
||||
ImGui::PopID();
|
||||
Index++;
|
||||
@@ -348,6 +318,116 @@ void FCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
bool FCogAbilityWindow_Abilities::ShouldShowAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec, const UGameplayAbility* Ability)
|
||||
{
|
||||
const bool IsBlocked = Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent) == false;
|
||||
if (Config->ShowBlocked && IsBlocked)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config->ShowActive && Spec.IsActive())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config->ShowInactive && Spec.IsActive() == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config->ShowPressed && Spec.InputPressed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
bool FCogAbilityWindow_Abilities::RenderAbilitiesTableHeader(UAbilitySystemComponent& AbilitySystemComponent)
|
||||
{
|
||||
if (ImGui::BeginTable("Abilities", 6, ImGuiTableFlags_SizingFixedFit
|
||||
| ImGuiTableFlags_Resizable
|
||||
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
||||
| ImGuiTableFlags_ScrollY
|
||||
| ImGuiTableFlags_RowBg
|
||||
| ImGuiTableFlags_BordersV
|
||||
| ImGuiTableFlags_Reorderable
|
||||
| ImGuiTableFlags_Hideable))
|
||||
{
|
||||
ImGui::TableSetupColumn("##Activation", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupScrollFreeze(0, 1);
|
||||
ImGui::TableSetupColumn("Ability");
|
||||
ImGui::TableSetupColumn("Level");
|
||||
ImGui::TableSetupColumn("Input");
|
||||
ImGui::TableSetupColumn("Cooldown");
|
||||
ImGui::TableSetupColumn("Blocking");
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilitiesTableRow(UAbilitySystemComponent& AbilitySystemComponent, int& SelectedIndex, int Index, FGameplayAbilitySpec& Spec, UGameplayAbility* Ability)
|
||||
{
|
||||
//------------------------
|
||||
// Activation
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilityActivation(Spec);
|
||||
|
||||
//------------------------
|
||||
// Name
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilitiesTableAbilityName(AbilitySystemComponent, SelectedIndex, Index, Spec, Ability);
|
||||
|
||||
//------------------------
|
||||
// Popup
|
||||
//------------------------
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
FCogWindowWidgets::BeginTableTooltip();
|
||||
RenderAbilityInfo(AbilitySystemComponent, Spec);
|
||||
FCogWindowWidgets::EndTableTooltip();
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// ContextMenu
|
||||
//------------------------
|
||||
RenderAbilityContextMenu(AbilitySystemComponent, Spec, Index);
|
||||
|
||||
//------------------------
|
||||
// Level
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilityLevel(Spec);
|
||||
|
||||
//------------------------
|
||||
// InputPressed
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilityInputPressed(Spec);
|
||||
|
||||
//------------------------
|
||||
// Cooldown
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilityCooldown(AbilitySystemComponent, *Ability);
|
||||
|
||||
//------------------------
|
||||
// Blocking
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderAbilitiesTableAbilityBlocking(AbilitySystemComponent, Ability);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityCooldown(const UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility& Ability)
|
||||
{
|
||||
@@ -356,8 +436,7 @@ void FCogAbilityWindow_Abilities::RenderAbilityCooldown(const UAbilitySystemComp
|
||||
return;
|
||||
}
|
||||
|
||||
FGameplayAbilitySpec* Spec = Ability.GetCurrentAbilitySpec();
|
||||
|
||||
const FGameplayAbilitySpec* Spec = Ability.GetCurrentAbilitySpec();
|
||||
if (Spec == nullptr)
|
||||
{
|
||||
return;
|
||||
@@ -375,6 +454,21 @@ void FCogAbilityWindow_Abilities::RenderAbilityCooldown(const UAbilitySystemComp
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityLevel(FGameplayAbilitySpec& Spec)
|
||||
{
|
||||
ImGui::Text("%d", Spec.Level);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityInputPressed(FGameplayAbilitySpec& Spec)
|
||||
{
|
||||
if (Spec.InputPressed)
|
||||
{
|
||||
FCogWindowWidgets::SmallButton("Pressed", FCogImguiHelper::ToImVec4(Config->ActiveAbilityColor));
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityContextMenu(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec, int Index)
|
||||
{
|
||||
@@ -443,7 +537,7 @@ void FCogAbilityWindow_Abilities::RenderAbilityInfo(const UAbilitySystemComponen
|
||||
|
||||
if (ImGui::BeginTable("Ability", 2, ImGuiTableFlags_Borders))
|
||||
{
|
||||
const ImVec4 TextColor(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
constexpr ImVec4 TextColor(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
|
||||
ImGui::TableSetupColumn("Property");
|
||||
ImGui::TableSetupColumn("Value");
|
||||
@@ -510,7 +604,7 @@ void FCogAbilityWindow_Abilities::RenderAbilityInfo(const UAbilitySystemComponen
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Level");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", Spec.Level);
|
||||
RenderAbilityLevel(Spec);
|
||||
|
||||
//------------------------
|
||||
// InputID
|
||||
@@ -526,28 +620,65 @@ void FCogAbilityWindow_Abilities::RenderAbilityInfo(const UAbilitySystemComponen
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "InputPressed");
|
||||
ImGui::TextColored(TextColor, "Input Pressed");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", Spec.InputPressed);
|
||||
RenderAbilityInputPressed(Spec);
|
||||
|
||||
//------------------------
|
||||
// AbilityTags
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "AbilityTags");
|
||||
ImGui::TextColored(TextColor, "Ability Tags");
|
||||
ImGui::TableNextColumn();
|
||||
const bool SatisfyTagRequirements = Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent);
|
||||
FCogAbilityHelper::RenderTagContainer(Ability->AbilityTags);
|
||||
|
||||
//---------------------------------------------
|
||||
// TODO: find a way to display blocking tags
|
||||
//---------------------------------------------
|
||||
//------------------------
|
||||
// RequiredTags
|
||||
//------------------------
|
||||
FGameplayTagContainer OwnedGameplayTags;
|
||||
AbilitySystemComponent.GetOwnedGameplayTags(OwnedGameplayTags);
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Required Tags");
|
||||
ImGui::TableNextColumn();
|
||||
if (const FGameplayTagContainer* ActivationRequiredTags = &PRIVATE_ACCESS_PTR(Ability, GameplayAbility_ActivationRequiredTags))
|
||||
{
|
||||
FCogAbilityHelper::RenderTagContainer(*ActivationRequiredTags, OwnedGameplayTags, true, false, false, FCogImguiHelper::ToImVec4(Config->DefaultTagsColor), FCogImguiHelper::ToImVec4(Config->BlockedTagsColor));
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// BlockingTags
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Blocking Tags");
|
||||
ImGui::TableNextColumn();
|
||||
if (const FGameplayTagContainer* ActivationBlockedTags = &PRIVATE_ACCESS_PTR(Ability, GameplayAbility_ActivationBlockedTags))
|
||||
{
|
||||
FGameplayTagContainer AllBlockingTags;
|
||||
AbilitySystemComponent.GetBlockedAbilityTags(AllBlockingTags);
|
||||
AllBlockingTags.AppendTags(OwnedGameplayTags);
|
||||
|
||||
FCogAbilityHelper::RenderTagContainer(*ActivationBlockedTags, AllBlockingTags, false, false, false, FCogImguiHelper::ToImVec4(Config->DefaultTagsColor), FCogImguiHelper::ToImVec4(Config->BlockedTagsColor));
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// Additional info
|
||||
//------------------------
|
||||
RenderAbilityAdditionalInfo(AbilitySystemComponent, Spec, *Ability, TextColor);
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::RenderAbilityAdditionalInfo(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec, UGameplayAbility& Ability, const ImVec4& TextColor)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Abilities::GameTick(float DeltaTime)
|
||||
{
|
||||
@@ -627,13 +758,13 @@ ImVec4 FCogAbilityWindow_Abilities::GetAbilityColor(const UAbilitySystemComponen
|
||||
|
||||
if (Spec.IsActive())
|
||||
{
|
||||
return FCogImguiHelper::ToImVec4(Config->ActiveColor);
|
||||
return FCogImguiHelper::ToImVec4(Config->ActiveAbilityColor);
|
||||
}
|
||||
|
||||
if (Ability != nullptr && Ability->DoesAbilitySatisfyTagRequirements(AbilitySystemComponent) == false)
|
||||
{
|
||||
return FCogImguiHelper::ToImVec4(Config->BlockedColor);
|
||||
return FCogImguiHelper::ToImVec4(Config->BlockedAbilityColor);
|
||||
}
|
||||
|
||||
return FCogImguiHelper::ToImVec4(Config->InactiveColor);
|
||||
return FCogImguiHelper::ToImVec4(Config->InactiveAbilityColor);
|
||||
}
|
||||
@@ -85,14 +85,14 @@ void FCogAbilityWindow_Effects::RenderContent()
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Effects::RenderEffectsTable()
|
||||
{
|
||||
const UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(GetSelection(), true);
|
||||
const UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(GetSelection(), true);
|
||||
if (AbilitySystemComponent == nullptr)
|
||||
{
|
||||
ImGui::TextDisabled("Selection has no ability system component");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("Effects", 4, ImGuiTableFlags_SizingFixedFit
|
||||
if (ImGui::BeginTable("Effects", 5, ImGuiTableFlags_SizingFixedFit
|
||||
| ImGuiTableFlags_Resizable
|
||||
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
||||
| ImGuiTableFlags_ScrollY
|
||||
@@ -107,6 +107,7 @@ void FCogAbilityWindow_Effects::RenderEffectsTable()
|
||||
ImGui::TableSetupColumn("Remaining Time");
|
||||
ImGui::TableSetupColumn("Stacks");
|
||||
ImGui::TableSetupColumn("Prediction");
|
||||
ImGui::TableSetupColumn("Inhibited");
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
static int SelectedIndex = -1;
|
||||
@@ -258,6 +259,11 @@ void FCogAbilityWindow_Effects::RenderEffectRow(const UAbilitySystemComponent& A
|
||||
ImGui::TableNextColumn();
|
||||
RenderPrediction(ActiveEffect, true);
|
||||
|
||||
//------------------------
|
||||
// Inhibited
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderInhibition(ActiveEffect, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -266,7 +272,7 @@ void FCogAbilityWindow_Effects::RenderEffectInfo(const UAbilitySystemComponent&
|
||||
{
|
||||
if (ImGui::BeginTable("Effect", 2, ImGuiTableFlags_Borders))
|
||||
{
|
||||
constexpr ImVec4 TextColor(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
constexpr ImVec4 TextColor(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
|
||||
ImGui::TableSetupColumn("Property");
|
||||
ImGui::TableSetupColumn("Value", ImGuiTableColumnFlags_WidthStretch);
|
||||
@@ -325,6 +331,15 @@ void FCogAbilityWindow_Effects::RenderEffectInfo(const UAbilitySystemComponent&
|
||||
ImGui::TableNextColumn();
|
||||
RenderPrediction(ActiveEffect, false);
|
||||
|
||||
//------------------------
|
||||
// Inhibited
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Inhibited");
|
||||
ImGui::TableNextColumn();
|
||||
RenderInhibition(ActiveEffect, false);
|
||||
|
||||
//------------------------
|
||||
// Dynamic Asset Tags
|
||||
//------------------------
|
||||
@@ -406,7 +421,7 @@ void FCogAbilityWindow_Effects::RenderRemainingTime(const UAbilitySystemComponen
|
||||
|
||||
if (Duration >= 0)
|
||||
{
|
||||
const UWorld* World = AbilitySystemComponent.GetWorld();
|
||||
const UWorld* World = AbilitySystemComponent.GetWorld();
|
||||
const float RemainingTime = StartTime + Duration - World->GetTimeSeconds();
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, IM_COL32(100, 100, 100, 255));
|
||||
@@ -457,6 +472,19 @@ void FCogAbilityWindow_Effects::RenderPrediction(const FActiveGameplayEffect& Ac
|
||||
ImGui::Text("%s", TCHAR_TO_ANSI(*PredictionString));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Effects::RenderInhibition(const FActiveGameplayEffect& ActiveEffect, bool Short)
|
||||
{
|
||||
if (ActiveEffect.bIsInhibited)
|
||||
{
|
||||
FCogWindowWidgets::SmallButton("Yes", ImVec4(1, 0, 0, 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text("No");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Effects::OpenEffect(const FActiveGameplayEffectHandle& Handle)
|
||||
{
|
||||
@@ -472,13 +500,13 @@ void FCogAbilityWindow_Effects::CloseEffect(const FActiveGameplayEffectHandle& H
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Effects::RenderOpenEffects()
|
||||
{
|
||||
const AActor* Selection = GetSelection();
|
||||
const AActor* Selection = GetSelection();
|
||||
if (Selection == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Selection, true);
|
||||
const UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Selection, true);
|
||||
if (AbilitySystemComponent == nullptr)
|
||||
{
|
||||
return;
|
||||
@@ -486,7 +514,7 @@ void FCogAbilityWindow_Effects::RenderOpenEffects()
|
||||
|
||||
for (int i = OpenedEffects.Num() - 1; i >= 0; --i)
|
||||
{
|
||||
const FActiveGameplayEffectHandle Handle = OpenedEffects[i];
|
||||
const FActiveGameplayEffectHandle Handle = OpenedEffects[i];
|
||||
|
||||
const FActiveGameplayEffect* ActiveEffectPtr = AbilitySystemComponent->GetActiveGameplayEffect(Handle);
|
||||
if (ActiveEffectPtr == nullptr)
|
||||
|
||||
@@ -235,6 +235,8 @@ void FCogAbilityWindow_OwnedTags::GetTagContainer(FGameplayTagContainer& TagCont
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// FCogAbilityWindow_BlockedTags
|
||||
//------------------------------------------
|
||||
void FCogAbilityWindow_BlockedTags::Initialize()
|
||||
{
|
||||
Super::Initialize();
|
||||
|
||||
@@ -0,0 +1,414 @@
|
||||
#include "CogAbilityWindow_Tasks.h"
|
||||
|
||||
#include "AbilitySystemGlobals.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "CogAbilityDataAsset.h"
|
||||
#include "CogAbilityHelper.h"
|
||||
#include "CogAbilityReplicator.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "imgui.h"
|
||||
|
||||
class UCogAbilityConfig_Tasks;
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::Initialize()
|
||||
{
|
||||
Super::Initialize();
|
||||
|
||||
bHasMenu = true;
|
||||
bNoPadding = true;
|
||||
|
||||
Config = GetConfig<UCogAbilityConfig_Tasks>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderHelp()
|
||||
{
|
||||
ImGui::Text(
|
||||
"This window displays the gameplay tasks. ");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::ResetConfig()
|
||||
{
|
||||
Super::ResetConfig();
|
||||
|
||||
Config->Reset();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTick(float DetlaTime)
|
||||
{
|
||||
Super::RenderTick(DetlaTime);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderContent()
|
||||
{
|
||||
Super::RenderContent();
|
||||
|
||||
AActor* Selection = GetSelection();
|
||||
if (Selection == nullptr)
|
||||
{
|
||||
ImGui::TextDisabled("Invalid selection");
|
||||
return;
|
||||
}
|
||||
|
||||
UAbilitySystemComponent* AbilitySystemComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Selection, true);
|
||||
if (AbilitySystemComponent == nullptr)
|
||||
{
|
||||
ImGui::TextDisabled("Selection has no ability system component");
|
||||
return;
|
||||
}
|
||||
|
||||
RenderTaskMenu(Selection);
|
||||
|
||||
RenderTasksTable(*AbilitySystemComponent);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTaskMenu(AActor* Selection)
|
||||
{
|
||||
if (ImGui::BeginMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Options"))
|
||||
{
|
||||
ImGui::Checkbox("Sort by Name", &Config->SortByName);
|
||||
ImGui::Checkbox("Show Uninitialized", &Config->ShowUninitialized);
|
||||
ImGui::Checkbox("Show Awaiting Activation", &Config->ShowAwaitingActivation);
|
||||
ImGui::Checkbox("Show Active", &Config->ShowActive);
|
||||
ImGui::Checkbox("Show Paused", &Config->ShowPaused);
|
||||
ImGui::Checkbox("Show Finished", &Config->ShowFinished);
|
||||
ImGui::Checkbox("Show Ticking", &Config->ShowTicking);
|
||||
ImGui::Checkbox("Show Simulating", &Config->ShowSimulating);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::ColorEdit4("Uninitialized Color", (float*)&Config->UninitializedColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Awaiting Activation Color", (float*)&Config->AwaitingActivationColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Active Color", (float*)&Config->ActiveColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Paused Color", (float*)&Config->PausedColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::ColorEdit4("Finished Color", (float*)&Config->FinishedColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::MenuItem("Reset"))
|
||||
{
|
||||
ResetConfig();
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
FCogWindowWidgets::SearchBar(Filter);
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTasksTable(UAbilitySystemComponent& AbilitySystemComponent)
|
||||
{
|
||||
TArray<const UGameplayTask*> FilteredTasks;
|
||||
FilteredTasks.Reserve(16);
|
||||
|
||||
const AActor* Selection = GetSelection();
|
||||
|
||||
for (FConstGameplayTaskIterator it = AbilitySystemComponent.GetKnownTaskIterator(); it; ++it)
|
||||
{
|
||||
const UGameplayTask* Task = Cast<const UGameplayTask>(*it);
|
||||
if (Task == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const EGameplayTaskState TaskState = Task->GetState();
|
||||
|
||||
if (Config->ShowUninitialized == false && TaskState == EGameplayTaskState::Uninitialized)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowAwaitingActivation == false && TaskState == EGameplayTaskState::AwaitingActivation)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowActive == false && TaskState == EGameplayTaskState::Active)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowPaused == false && TaskState == EGameplayTaskState::Paused)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowFinished == false && TaskState == EGameplayTaskState::Finished)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowTicking == false && Task->IsTickingTask())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Config->ShowSimulating == false && Task->IsSimulating())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* TaskName = StringCast<ANSICHAR>(*Task->GetName()).Get();
|
||||
bool PassFilter = Filter.PassFilter(TaskName);
|
||||
|
||||
if (PassFilter == false)
|
||||
{
|
||||
if (const UGameplayAbility* Ability = Cast<UGameplayAbility>(Task->GetTaskOwner()))
|
||||
{
|
||||
const char* AbilityName = StringCast<ANSICHAR>(*FCogAbilityHelper::CleanupName(Ability->GetName())).Get();
|
||||
PassFilter = Filter.PassFilter(AbilityName);
|
||||
}
|
||||
}
|
||||
|
||||
if (PassFilter == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
FilteredTasks.Add(Task);
|
||||
}
|
||||
|
||||
if (Config->SortByName)
|
||||
{
|
||||
FilteredTasks.Sort([](const UGameplayTask& Lhs, const UGameplayTask& Rhs)
|
||||
{
|
||||
return Lhs.GetName().Compare(Rhs.GetName()) < 0;
|
||||
});
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("Tasks", 4, ImGuiTableFlags_SizingFixedFit
|
||||
| ImGuiTableFlags_Resizable
|
||||
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
||||
| ImGuiTableFlags_ScrollY
|
||||
| ImGuiTableFlags_RowBg
|
||||
| ImGuiTableFlags_BordersV
|
||||
| ImGuiTableFlags_Reorderable
|
||||
| ImGuiTableFlags_Hideable))
|
||||
{
|
||||
ImGui::TableSetupScrollFreeze(0, 1);
|
||||
ImGui::TableSetupColumn("State");
|
||||
ImGui::TableSetupColumn("Task");
|
||||
ImGui::TableSetupColumn("Owner");
|
||||
ImGui::TableSetupColumn("Is Ticking");
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
static int SelectedIndex = -1;
|
||||
|
||||
ImGuiListClipper Clipper;
|
||||
Clipper.Begin(FilteredTasks.Num());
|
||||
while (Clipper.Step())
|
||||
{
|
||||
for (int32 LineIndex = Clipper.DisplayStart; LineIndex < Clipper.DisplayEnd; LineIndex++)
|
||||
{
|
||||
const UGameplayTask* Task = FilteredTasks[LineIndex];
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::PushID(LineIndex);
|
||||
|
||||
//------------------------
|
||||
// State
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderTaskState(Task);
|
||||
|
||||
//------------------------
|
||||
// Name
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
const char* TaskName = StringCast<ANSICHAR>(*Task->GetName()).Get();
|
||||
if (ImGui::Selectable(TaskName, SelectedIndex == LineIndex, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick))
|
||||
{
|
||||
SelectedIndex = LineIndex;
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// Popup
|
||||
//------------------------
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
FCogWindowWidgets::BeginTableTooltip();
|
||||
RenderTaskInfo(Task);
|
||||
FCogWindowWidgets::EndTableTooltip();
|
||||
}
|
||||
|
||||
//------------------------
|
||||
// Owner
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
RenderTaskOwner(Task);
|
||||
|
||||
//------------------------
|
||||
// IsTicking
|
||||
//------------------------
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(Task->IsTickingTask() ? "Yes" : "No");
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
}
|
||||
Clipper.End();
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTaskInfo(const UGameplayTask* Task)
|
||||
{
|
||||
if (Task == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("Task", 2, ImGuiTableFlags_Borders))
|
||||
{
|
||||
constexpr ImVec4 TextColor(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
|
||||
ImGui::TableSetupColumn("Property");
|
||||
ImGui::TableSetupColumn("Value");
|
||||
|
||||
//------------------------
|
||||
// Name
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Name");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetName()).Get());
|
||||
|
||||
//------------------------
|
||||
// Instance Name
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Instance Name");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetInstanceName().ToString()).Get());
|
||||
|
||||
//------------------------
|
||||
// Owner
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Ability");
|
||||
ImGui::TableNextColumn();
|
||||
RenderTaskOwner(Task);
|
||||
|
||||
//------------------------
|
||||
// State
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "State");
|
||||
ImGui::TableNextColumn();
|
||||
RenderTaskState(Task);
|
||||
|
||||
//------------------------
|
||||
// Priority
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Priority");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", (int32)Task->GetPriority());
|
||||
|
||||
//------------------------
|
||||
// IsTicking
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Is Ticking");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(Task->IsTickingTask() ? "Yes" : "No");
|
||||
|
||||
//------------------------
|
||||
// IsSimulated
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Is Simulated");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(Task->IsSimulatedTask() ? "Yes" : "No");
|
||||
|
||||
//------------------------
|
||||
// IsSimulating
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Is Simulating");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text(Task->IsSimulating() ? "Yes" : "No");
|
||||
|
||||
//------------------------
|
||||
// Debug
|
||||
//------------------------
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextColored(TextColor, "Debug");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::PushTextWrapPos(FCogWindowWidgets::GetFontWidth() * 80);
|
||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetDebugString()).Get());
|
||||
ImGui::PopTextWrapPos();
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTaskOwner(const UGameplayTask* Task)
|
||||
{
|
||||
IGameplayTaskOwnerInterface* TaskOwner = Task->GetTaskOwner();
|
||||
|
||||
FString OwnerName;
|
||||
if (const UGameplayAbility* Ability = Cast<UGameplayAbility>(TaskOwner))
|
||||
{
|
||||
OwnerName = FCogAbilityHelper::CleanupName(Ability->GetName());
|
||||
}
|
||||
else if (const UObject* Object = Cast<UObject>(TaskOwner))
|
||||
{
|
||||
OwnerName = GetNameSafe(Object);
|
||||
}
|
||||
|
||||
ImGui::Text(StringCast<ANSICHAR>(*OwnerName).Get());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogAbilityWindow_Tasks::RenderTaskState(const UGameplayTask* Task)
|
||||
{
|
||||
switch (Task->GetState())
|
||||
{
|
||||
case EGameplayTaskState::Uninitialized:
|
||||
FCogWindowWidgets::SmallButton("Uninitialized", FCogImguiHelper::ToImVec4(Config->UninitializedColor));
|
||||
break;
|
||||
|
||||
case EGameplayTaskState::AwaitingActivation:
|
||||
FCogWindowWidgets::SmallButton("Awaiting Activation", FCogImguiHelper::ToImVec4(Config->AwaitingActivationColor));
|
||||
break;
|
||||
|
||||
case EGameplayTaskState::Active:
|
||||
FCogWindowWidgets::SmallButton("Active", FCogImguiHelper::ToImVec4(Config->ActiveColor));
|
||||
break;
|
||||
|
||||
case EGameplayTaskState::Paused:
|
||||
FCogWindowWidgets::SmallButton("Paused", FCogImguiHelper::ToImVec4(Config->PausedColor));
|
||||
break;
|
||||
|
||||
case EGameplayTaskState::Finished:
|
||||
FCogWindowWidgets::SmallButton("Finished", FCogImguiHelper::ToImVec4(Config->FinishedColor));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogAbilityConfig_Alignment.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
@@ -14,7 +14,7 @@ struct FModifierSpec;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Alignment : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Alignment : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
@@ -15,5 +15,15 @@ public:
|
||||
|
||||
static FString CleanupName(FString Str);
|
||||
|
||||
static void RenderTagContainer(const FGameplayTagContainer& Container);
|
||||
static void RenderTagContainer(const FGameplayTagContainer& Container, const bool Inline = false, const ImVec4& Color = ImVec4(0.4f, 0.4f, 0.4f, 1.0f));
|
||||
|
||||
static void RenderTagContainer(
|
||||
const FGameplayTagContainer& ContainerTags,
|
||||
const FGameplayTagContainer& TagsToMatch,
|
||||
const bool InverseMatch = false,
|
||||
const bool OnlyShowMatches = false,
|
||||
const bool Inline = false,
|
||||
const ImVec4& DefaultColor = ImVec4(0.4f, 0.4f, 0.4f, 1.0f),
|
||||
const ImVec4& MatchColor = ImVec4(1.0f, 0.0f, 0.0f, 1.0f));
|
||||
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "GameplayAbilitySpecHandle.h"
|
||||
#include "CogAbilityWindow_Abilities.generated.h"
|
||||
|
||||
@@ -26,18 +26,37 @@ protected:
|
||||
|
||||
virtual void RenderHelp() override;
|
||||
|
||||
virtual void RenderTick(float DetlaTime) override;
|
||||
virtual void RenderTick(float DeltaTime) override;
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
virtual void GameTick(float DeltaTime) override;
|
||||
|
||||
virtual void RenderAbiltiesMenu(AActor* Selection);
|
||||
virtual void RenderAbilitiesMenu(AActor* Selection);
|
||||
|
||||
virtual void RenderAbilitiesMenuFilters();
|
||||
|
||||
virtual void RenderAbilitiesMenuColorSettings();
|
||||
|
||||
virtual FString GetAbilityName(const UGameplayAbility* Ability);
|
||||
|
||||
|
||||
virtual void RenderAbilitiesTable(UAbilitySystemComponent& AbilitySystemComponent);
|
||||
|
||||
virtual bool RenderAbilitiesTableHeader(UAbilitySystemComponent& AbilitySystemComponent);
|
||||
|
||||
virtual void RenderAbilitiesTableRow(UAbilitySystemComponent& AbilitySystemComponent, int& SelectedIndex, int Index,
|
||||
FGameplayAbilitySpec& Spec, UGameplayAbility* Ability);
|
||||
|
||||
virtual void RenderAbilityActivation(FGameplayAbilitySpec& Spec);
|
||||
|
||||
virtual void RenderAbilitiesTableAbilityName(UAbilitySystemComponent& AbilitySystemComponent, int& SelectedIndex, int Index, FGameplayAbilitySpec& Spec, UGameplayAbility* Ability);
|
||||
|
||||
virtual void RenderAbilitiesTableAbilityBlocking(UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility* Ability);
|
||||
|
||||
virtual void RenderAbilityLevel(FGameplayAbilitySpec& Spec);
|
||||
|
||||
virtual void RenderAbilityInputPressed(FGameplayAbilitySpec& Spec);
|
||||
|
||||
virtual void RenderAbilityCooldown(const UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility& Ability);
|
||||
|
||||
virtual void RenderAbilityContextMenu(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec, int Index);
|
||||
@@ -46,6 +65,8 @@ protected:
|
||||
|
||||
virtual void RenderAbilityInfo(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||
|
||||
virtual void RenderAbilityAdditionalInfo(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec, UGameplayAbility& Ability, const ImVec4& TextColor);
|
||||
|
||||
virtual void ProcessAbilityActivation(const FGameplayAbilitySpecHandle& Handle);
|
||||
|
||||
virtual void ActivateAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||
@@ -58,6 +79,9 @@ protected:
|
||||
|
||||
virtual ImVec4 GetAbilityColor(const UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec);
|
||||
|
||||
virtual bool ShouldShowAbility(UAbilitySystemComponent& AbilitySystemComponent, FGameplayAbilitySpec& Spec,
|
||||
const UGameplayAbility* Ability);
|
||||
|
||||
FGameplayAbilitySpecHandle AbilityHandleToActivate;
|
||||
|
||||
FGameplayAbilitySpecHandle AbilityHandleToRemove;
|
||||
@@ -73,7 +97,7 @@ protected:
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Abilities : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Abilities : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -88,17 +112,29 @@ public:
|
||||
UPROPERTY(Config)
|
||||
bool ShowInactive = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowPressed = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowBlocked = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f ActiveColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
FVector4f ActiveAbilityColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f InactiveColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
FVector4f InactiveAbilityColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f BlockedColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
FVector4f BlockedAbilityColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f DefaultTagsColor = FVector4f(0.6f, 0.6f, 0.6f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f BlockedTagsColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f InputPressedColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
|
||||
virtual void Reset() override
|
||||
{
|
||||
@@ -107,9 +143,13 @@ public:
|
||||
SortByName = false;
|
||||
ShowActive = true;
|
||||
ShowInactive = true;
|
||||
ShowPressed = true;
|
||||
ShowBlocked = true;
|
||||
ActiveColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
InactiveColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
BlockedColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
ActiveAbilityColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
InactiveAbilityColor = FVector4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
BlockedAbilityColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
DefaultTagsColor = FVector4f(0.6f, 0.6f, 0.6f, 1.0f);
|
||||
BlockedTagsColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
InputPressedColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
}
|
||||
};
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "CogAbilityWindow_Attributes.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
@@ -42,7 +42,7 @@ private:
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Attributes : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Attributes : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "CogAbilityWindow_Cheats.generated.h"
|
||||
|
||||
class AActor;
|
||||
@@ -47,7 +47,7 @@ protected:
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Cheats : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Cheats : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "ActiveGameplayEffectHandle.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "imgui.h"
|
||||
#include "CogAbilityWindow_Effects.generated.h"
|
||||
|
||||
@@ -48,6 +48,8 @@ protected:
|
||||
|
||||
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||
|
||||
virtual void RenderInhibition(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||
|
||||
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
||||
|
||||
virtual FString GetEffectNameSafe(const UGameplayEffect* Effect);
|
||||
@@ -71,7 +73,7 @@ protected:
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Effects : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Effects : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogCommonConfig.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogWindowConfig.h"
|
||||
#include "CogAbilityWindow_Tags.generated.h"
|
||||
|
||||
struct FGameplayTagContainer;
|
||||
@@ -67,7 +67,7 @@ class COGABILITY_API FCogAbilityWindow_BlockedTags : public FCogAbilityWindow_Ta
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Tags : public UCogWindowConfig
|
||||
class UCogAbilityConfig_Tags : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogWindow.h"
|
||||
#include "CogAbilityWindow_Tasks.generated.h"
|
||||
|
||||
class UAbilitySystemComponent;
|
||||
class UCogAbilityConfig_Tasks;
|
||||
class UCogAbilityDataAsset;
|
||||
class UGameplayTask;
|
||||
|
||||
class COGABILITY_API FCogAbilityWindow_Tasks : public FCogWindow
|
||||
{
|
||||
typedef FCogWindow Super;
|
||||
|
||||
public:
|
||||
|
||||
virtual void Initialize() override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void ResetConfig() override;
|
||||
|
||||
virtual void RenderHelp() override;
|
||||
|
||||
virtual void RenderTick(float DetlaTime) override;
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
virtual void RenderTaskMenu(AActor* Selection);
|
||||
|
||||
virtual void RenderTasksTable(UAbilitySystemComponent& AbilitySystemComponent);
|
||||
|
||||
virtual void RenderTaskInfo(const UGameplayTask* Task);
|
||||
|
||||
virtual void RenderTaskOwner(const UGameplayTask* Task);
|
||||
|
||||
virtual void RenderTaskState(const UGameplayTask* Task);
|
||||
|
||||
TObjectPtr<UCogAbilityConfig_Tasks> Config = nullptr;
|
||||
|
||||
ImGuiTextFilter Filter;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(Config = Cog)
|
||||
class UCogAbilityConfig_Tasks : public UCogCommonConfig
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool SortByName = false;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowTicking = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowSimulating = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowUninitialized = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowAwaitingActivation = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowActive = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowPaused = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool ShowFinished = true;
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f UninitializedColor = FVector4f(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f AwaitingActivationColor = FVector4f(0.6f, 0.6f, 0.6f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f ActiveColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f PausedColor = FVector4f(0.3f, 0.3f, 0.3f, 1.0f);
|
||||
|
||||
UPROPERTY(Config)
|
||||
FVector4f FinishedColor = FVector4f(1.0f, 0.5f, 0.5f, 1.0f);
|
||||
|
||||
|
||||
virtual void Reset() override
|
||||
{
|
||||
Super::Reset();
|
||||
|
||||
SortByName = false;
|
||||
ShowTicking = true;
|
||||
ShowActive = true;
|
||||
ShowPaused = true;
|
||||
ShowFinished = true;
|
||||
ActiveColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
PausedColor = FVector4f(0.3f, 0.3f, 0.3f, 1.0f);
|
||||
FinishedColor = FVector4f(0.0f, 1.0f, 0.5f, 1.0f);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user