mirror of
https://github.com/Ed94/Cog.git
synced 2026-07-26 01:13:47 +00:00
various bug fixes
This commit is contained in:
@@ -252,6 +252,13 @@ void UCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent&
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogAbilityWindow_Abilities::RenderAbilityCooldown(const UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility& Ability)
|
||||
{
|
||||
FGameplayAbilitySpec* Spec = Ability.GetCurrentAbilitySpec();
|
||||
|
||||
if (Spec == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float RemainingTime, CooldownDuration;
|
||||
Ability.GetCooldownTimeRemainingAndDuration(Ability.GetCurrentAbilitySpec()->Handle, AbilitySystemComponent.AbilityActorInfo.Get(), RemainingTime, CooldownDuration);
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ void UCogAbilityWindow_Cheats::RequestCheat(AActor* ControlledActor, AActor* Sel
|
||||
|
||||
if (ICogCommonAllegianceActorInterface* AllegianceInterface = Cast<ICogCommonAllegianceActorInterface>(OtherActor))
|
||||
{
|
||||
AllegianceInterface->GetAllegianceWithOtherActor(ControlledActor);
|
||||
Allegiance = AllegianceInterface->GetAllegianceWithOtherActor(ControlledActor);
|
||||
}
|
||||
|
||||
if ((IsShiftDown && (Allegiance == ECogCommonAllegiance::Enemy))
|
||||
|
||||
@@ -83,8 +83,6 @@ void FCogDebugMetricValue::UpdateMetricPerSecond(const float Duration)
|
||||
PerSecond = Duration > 1.0f ? Total / Duration : Total;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void FCogDebugMetricEntry::Reset()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "CogDebugMetric.h"
|
||||
#include "CogImguiHelper.h"
|
||||
#include "CogWindowWidgets.h"
|
||||
#include "imgui.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -81,29 +82,32 @@ void UCogEngineWindow_Metrics::RenderContent()
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
if (GetWorld()->GetNetMode() == ENetMode::NM_Client)
|
||||
{
|
||||
ImGui::Text("Currently not available on client");
|
||||
return;
|
||||
}
|
||||
|
||||
if (FCogDebugMetric::Metrics.IsEmpty())
|
||||
{
|
||||
ImGui::BeginDisabled();
|
||||
ImGui::Text("No metric received yet");
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
int32 Index = 0;
|
||||
for (auto& Entry : FCogDebugMetric::Metrics)
|
||||
{
|
||||
int32 Index = 0;
|
||||
for (auto& Entry : FCogDebugMetric::Metrics)
|
||||
FName MetricName = Entry.Key;
|
||||
FCogDebugMetricEntry& Metric = Entry.Value;
|
||||
|
||||
if (ImGui::CollapsingHeader(TCHAR_TO_ANSI(*MetricName.ToString()), ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
FName MetricName = Entry.Key;
|
||||
FCogDebugMetricEntry& Metric = Entry.Value;
|
||||
|
||||
if (ImGui::CollapsingHeader(TCHAR_TO_ANSI(*MetricName.ToString()), ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
ImGui::PushID(Index);
|
||||
DrawMetric(Metric);
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
Index++;
|
||||
ImGui::PushID(Index);
|
||||
DrawMetric(Metric);
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
Index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,6 +293,10 @@ void UCogInputWindow_Gamepad::RenderContent()
|
||||
ImGui::Dummy(bShowAsOverlay ? CanvasMax - CanvasMin : ContentSize);
|
||||
if (ImGui::BeginPopupContextItem())
|
||||
{
|
||||
if (ImGui::Button("Close", ImVec2(-1.0f, 0)))
|
||||
{
|
||||
SetIsVisible(false);
|
||||
}
|
||||
ImGui::Checkbox("Overlay", &bShowAsOverlay);
|
||||
ImGui::Separator();
|
||||
ImGui::Checkbox("Invert Left Stick Y", &bInvertLeftStickY);
|
||||
|
||||
@@ -36,7 +36,6 @@ private:
|
||||
UPROPERTY(Config)
|
||||
float RepeatPeriod = 0.5f;
|
||||
|
||||
UPROPERTY(Config)
|
||||
float RepeatTime = 0.0f;
|
||||
|
||||
UPROPERTY()
|
||||
|
||||
@@ -69,6 +69,9 @@ private:
|
||||
UPROPERTY(Config)
|
||||
float Border = 0.02f;
|
||||
|
||||
UPROPERTY(Config)
|
||||
float RepeatPeriod = 0.5f;
|
||||
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<const UCogInputDataAsset> Asset;
|
||||
|
||||
@@ -78,8 +81,6 @@ private:
|
||||
|
||||
ImDrawList* DrawList = nullptr;
|
||||
|
||||
float RepeatPeriod = 0.5f;
|
||||
|
||||
float RepeatTime = 0.0f;
|
||||
|
||||
ImVec2 CanvasMin;
|
||||
|
||||
@@ -78,11 +78,11 @@ protected:
|
||||
|
||||
ULocalPlayer* GetLocalPlayer();
|
||||
|
||||
protected:
|
||||
|
||||
UPROPERTY(Config)
|
||||
bool bHasMenu = false;
|
||||
|
||||
private:
|
||||
|
||||
bool bIsVisible = false;
|
||||
|
||||
bool bShowInsideMenu = true;
|
||||
|
||||
Reference in New Issue
Block a user