mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-06 07:38:46 +00:00
Display inhibition of gameplay effects
This commit is contained in:
@@ -92,7 +92,7 @@ void FCogAbilityWindow_Effects::RenderEffectsTable()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginTable("Effects", 4, ImGuiTableFlags_SizingFixedFit
|
if (ImGui::BeginTable("Effects", 5, ImGuiTableFlags_SizingFixedFit
|
||||||
| ImGuiTableFlags_Resizable
|
| ImGuiTableFlags_Resizable
|
||||||
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
| ImGuiTableFlags_NoBordersInBodyUntilResize
|
||||||
| ImGuiTableFlags_ScrollY
|
| ImGuiTableFlags_ScrollY
|
||||||
@@ -107,6 +107,7 @@ void FCogAbilityWindow_Effects::RenderEffectsTable()
|
|||||||
ImGui::TableSetupColumn("Remaining Time");
|
ImGui::TableSetupColumn("Remaining Time");
|
||||||
ImGui::TableSetupColumn("Stacks");
|
ImGui::TableSetupColumn("Stacks");
|
||||||
ImGui::TableSetupColumn("Prediction");
|
ImGui::TableSetupColumn("Prediction");
|
||||||
|
ImGui::TableSetupColumn("Inhibited");
|
||||||
ImGui::TableHeadersRow();
|
ImGui::TableHeadersRow();
|
||||||
|
|
||||||
static int SelectedIndex = -1;
|
static int SelectedIndex = -1;
|
||||||
@@ -258,6 +259,11 @@ void FCogAbilityWindow_Effects::RenderEffectRow(const UAbilitySystemComponent& A
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
RenderPrediction(ActiveEffect, true);
|
RenderPrediction(ActiveEffect, true);
|
||||||
|
|
||||||
|
//------------------------
|
||||||
|
// Inhibited
|
||||||
|
//------------------------
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
RenderInhibition(ActiveEffect, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,6 +331,15 @@ void FCogAbilityWindow_Effects::RenderEffectInfo(const UAbilitySystemComponent&
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
RenderPrediction(ActiveEffect, false);
|
RenderPrediction(ActiveEffect, false);
|
||||||
|
|
||||||
|
//------------------------
|
||||||
|
// Inhibited
|
||||||
|
//------------------------
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::TextColored(TextColor, "Inhibited");
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
RenderInhibition(ActiveEffect, false);
|
||||||
|
|
||||||
//------------------------
|
//------------------------
|
||||||
// Dynamic Asset Tags
|
// Dynamic Asset Tags
|
||||||
//------------------------
|
//------------------------
|
||||||
@@ -457,6 +472,19 @@ void FCogAbilityWindow_Effects::RenderPrediction(const FActiveGameplayEffect& Ac
|
|||||||
ImGui::Text("%s", TCHAR_TO_ANSI(*PredictionString));
|
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)
|
void FCogAbilityWindow_Effects::OpenEffect(const FActiveGameplayEffectHandle& Handle)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ protected:
|
|||||||
|
|
||||||
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
virtual void RenderPrediction(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||||
|
|
||||||
|
virtual void RenderInhibition(const FActiveGameplayEffect& ActiveEffect, bool Short);
|
||||||
|
|
||||||
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
virtual FString GetEffectName(const UGameplayEffect& Effect);
|
||||||
|
|
||||||
virtual FString GetEffectNameSafe(const UGameplayEffect* Effect);
|
virtual FString GetEffectNameSafe(const UGameplayEffect* Effect);
|
||||||
|
|||||||
Reference in New Issue
Block a user