diff --git a/Content/Core/Debug/Cheats/GA_Cheat_Debug.uasset b/Content/Core/Debug/Cheats/GA_Cheat_Debug.uasset index f61b660..4e915a3 100644 Binary files a/Content/Core/Debug/Cheats/GA_Cheat_Debug.uasset and b/Content/Core/Debug/Cheats/GA_Cheat_Debug.uasset differ diff --git a/Content/Core/Hud/WBP_Bar.uasset b/Content/Core/Hud/WBP_Bar.uasset index a84261a..633949e 100644 Binary files a/Content/Core/Hud/WBP_Bar.uasset and b/Content/Core/Hud/WBP_Bar.uasset differ diff --git a/Content/Core/Hud/WBP_Hud.uasset b/Content/Core/Hud/WBP_Hud.uasset index bc45b24..1d11409 100644 Binary files a/Content/Core/Hud/WBP_Hud.uasset and b/Content/Core/Hud/WBP_Hud.uasset differ diff --git a/Content/Core/Hud/WBP_Status.uasset b/Content/Core/Hud/WBP_Status.uasset index cca6478..51be300 100644 Binary files a/Content/Core/Hud/WBP_Status.uasset and b/Content/Core/Hud/WBP_Status.uasset differ diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp index 65f3412..99d6378 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Attributes.cpp @@ -295,18 +295,21 @@ void UCogAbilityWindow_Attributes::DrawAttributeInfo(const UAbilitySystemCompone const float BaseValue = AbilitySystemComponent.GetNumericAttributeBase(Attribute); const float CurrentValue = AbilitySystemComponent.GetNumericAttribute(Attribute); - ImVec4 Color; - if (CurrentValue > BaseValue) + FLinearColor Color = FLinearColor::White; + if (Asset != nullptr) { - Color = ImVec4(0.0f, 1.0f, 0.0f, 1.0f); - } - else if (CurrentValue < BaseValue) - { - Color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f); - } - else - { - Color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); + if (CurrentValue > BaseValue) + { + Color = Asset->PositiveEffectColor; + } + else if (CurrentValue < BaseValue) + { + Color = Asset->NegativeEffectColor; + } + else + { + Color = Asset->NeutralEffectColor; + } } //------------------------ @@ -334,7 +337,7 @@ void UCogAbilityWindow_Attributes::DrawAttributeInfo(const UAbilitySystemCompone ImGui::TableNextColumn(); ImGui::TextColored(TextColor, "Current Value"); ImGui::TableNextColumn(); - ImGui::PushStyleColor(ImGuiCol_Text, Color); + ImGui::PushStyleColor(ImGuiCol_Text, FCogImguiHelper::ToImVec4(Color)); ImGui::Text("%0.2f", CurrentValue); ImGui::PopStyleColor(1); @@ -354,6 +357,68 @@ void UCogAbilityWindow_Attributes::DrawAttributeInfo(const UAbilitySystemCompone { const FModifierSpec& ModSpec = ActiveEffect->Spec.Modifiers[i]; const FGameplayModifierInfo& ModInfo = ActiveEffect->Spec.Def->Modifiers[i]; + const float ModValue = ModSpec.GetEvaluatedMagnitude(); + + FLinearColor ModColor = FLinearColor::White; + if (Asset != nullptr) + { + ModColor = Asset->NeutralEffectColor; + + switch (ModInfo.ModifierOp) + { + case EGameplayModOp::Additive: + { + if (ModValue > 0.0f) + { + ModColor = Asset->PositiveEffectColor; + } + else if (ModValue < 0.0f) + { + ModColor = Asset->NegativeEffectColor; + } + break; + } + + case EGameplayModOp::Multiplicitive: + { + if (ModValue > 1.0f) + { + ModColor = Asset->PositiveEffectColor; + } + else if (ModValue < 1.0f) + { + ModColor = Asset->NegativeEffectColor; + } + break; + } + + case EGameplayModOp::Division: + { + if (ModValue < 1.0f) + { + ModColor = Asset->PositiveEffectColor; + } + else if (ModValue > 1.0f) + { + ModColor = Asset->NegativeEffectColor; + } + break; + } + + case EGameplayModOp::Override: + { + if (ModValue > BaseValue) + { + ModColor = Asset->PositiveEffectColor; + } + else if (ModValue < BaseValue) + { + ModColor = Asset->NegativeEffectColor; + } + break; + } + } + } if (ModInfo.Attribute == Attribute) { @@ -365,7 +430,7 @@ void UCogAbilityWindow_Attributes::DrawAttributeInfo(const UAbilitySystemCompone ImGui::TableNextColumn(); ImGui::Text("%s", TCHAR_TO_ANSI(*FCogAbilityHelper::CleanupName(GetNameSafe(ActiveEffect->Spec.Def)))); ImGui::Text("%s", TCHAR_TO_ANSI(*EGameplayModOpToString(ModInfo.ModifierOp))); - ImGui::Text("%0.2f", ModSpec.GetEvaluatedMagnitude()); + ImGui::TextColored(FCogImguiHelper::ToImVec4(ModColor), "%0.2f", ModSpec.GetEvaluatedMagnitude()); } } } diff --git a/Plugins/CogDebug/Source/CogDebug/Private/CogDebugShape.cpp b/Plugins/CogDebug/Source/CogDebug/Private/CogDebugShape.cpp index 043a5c5..bef0f22 100644 --- a/Plugins/CogDebug/Source/CogDebug/Private/CogDebugShape.cpp +++ b/Plugins/CogDebug/Source/CogDebug/Private/CogDebugShape.cpp @@ -1,5 +1,6 @@ #include "CogDebugShape.h" +#include "CogCommon.h" #include "CogDebugDrawHelper.h" #include "DrawDebugHelpers.h" @@ -167,8 +168,8 @@ FCogDebugShape FCogDebugShape::MakeBox(const FVector& Center, const FRotator& Ro FCogDebugShape NewElement; NewElement.ShapeData.Add(Center); - NewElement.ShapeData.Add(FVector(Rotation.Pitch, Rotation.Yaw, Rotation.Roll)); NewElement.ShapeData.Add(Extent); + NewElement.ShapeData.Add(FVector(Rotation.Pitch, Rotation.Yaw, Rotation.Roll)); NewElement.Color = Color; NewElement.Type = ECogDebugShape::Box; @@ -190,7 +191,7 @@ void FCogDebugShape::DrawBox(UWorld* World) World, ShapeData[0], ShapeData[1], - FQuat(FRotator(ShapeData[1].X, ShapeData[1].Y, ShapeData[1].Z)), + FQuat(FRotator(ShapeData[2].X, ShapeData[2].Y, ShapeData[2].Z)), FCogDebugSettings::ModulateServerColor(Color), FCogDebugSettings::GetDebugPersistent(bPersistent), FCogDebugSettings::GetDebugDuration(bPersistent),