mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-05 15:18:47 +00:00
fix compilation errors on Linux
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Modules/ModuleManager.h"
|
#include "Modules/ModuleManager.h"
|
||||||
#include "imgui.h"
|
#include "UObject/Class.h"
|
||||||
|
|
||||||
class COGDEBUG_API FCogDebugHelper
|
class COGDEBUG_API FCogDebugHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -160,15 +160,15 @@ void FCogAbilityWindow_Tasks::RenderTasksTable(UAbilitySystemComponent& AbilityS
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* TaskName = StringCast<ANSICHAR>(*Task->GetName()).Get();
|
const auto& TaskName = StringCast<ANSICHAR>(*Task->GetName());
|
||||||
bool PassFilter = Filter.PassFilter(TaskName);
|
bool PassFilter = Filter.PassFilter(TaskName.Get());
|
||||||
|
|
||||||
if (PassFilter == false)
|
if (PassFilter == false)
|
||||||
{
|
{
|
||||||
if (const UGameplayAbility* Ability = Cast<UGameplayAbility>(Task->GetTaskOwner()))
|
if (const UGameplayAbility* Ability = Cast<UGameplayAbility>(Task->GetTaskOwner()))
|
||||||
{
|
{
|
||||||
const char* AbilityName = StringCast<ANSICHAR>(*FCogAbilityHelper::CleanupName(Ability->GetName())).Get();
|
const auto& AbilityName = StringCast<ANSICHAR>(*FCogAbilityHelper::CleanupName(Ability->GetName()));
|
||||||
PassFilter = Filter.PassFilter(AbilityName);
|
PassFilter = Filter.PassFilter(AbilityName.Get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,8 +228,8 @@ void FCogAbilityWindow_Tasks::RenderTasksTable(UAbilitySystemComponent& AbilityS
|
|||||||
//------------------------
|
//------------------------
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
const char* TaskName = StringCast<ANSICHAR>(*Task->GetName()).Get();
|
const auto& TaskName = StringCast<ANSICHAR>(*Task->GetName());
|
||||||
if (ImGui::Selectable(TaskName, SelectedIndex == LineIndex, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick))
|
if (ImGui::Selectable(TaskName.Get(), SelectedIndex == LineIndex, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick))
|
||||||
{
|
{
|
||||||
SelectedIndex = LineIndex;
|
SelectedIndex = LineIndex;
|
||||||
}
|
}
|
||||||
@@ -287,7 +287,7 @@ void FCogAbilityWindow_Tasks::RenderTaskInfo(const UGameplayTask* Task)
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextColored(TextColor, "Name");
|
ImGui::TextColored(TextColor, "Name");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetName()).Get());
|
ImGui::Text("%s", StringCast<ANSICHAR>(*Task->GetName()).Get());
|
||||||
|
|
||||||
//------------------------
|
//------------------------
|
||||||
// Instance Name
|
// Instance Name
|
||||||
@@ -296,7 +296,7 @@ void FCogAbilityWindow_Tasks::RenderTaskInfo(const UGameplayTask* Task)
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextColored(TextColor, "Instance Name");
|
ImGui::TextColored(TextColor, "Instance Name");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetInstanceName().ToString()).Get());
|
ImGui::Text("%s", StringCast<ANSICHAR>(*Task->GetInstanceName().ToString()).Get());
|
||||||
|
|
||||||
//------------------------
|
//------------------------
|
||||||
// Owner
|
// Owner
|
||||||
@@ -360,7 +360,7 @@ void FCogAbilityWindow_Tasks::RenderTaskInfo(const UGameplayTask* Task)
|
|||||||
ImGui::TextColored(TextColor, "Debug");
|
ImGui::TextColored(TextColor, "Debug");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::PushTextWrapPos(FCogWindowWidgets::GetFontWidth() * 80);
|
ImGui::PushTextWrapPos(FCogWindowWidgets::GetFontWidth() * 80);
|
||||||
ImGui::Text(StringCast<ANSICHAR>(*Task->GetDebugString()).Get());
|
ImGui::Text("%s", StringCast<ANSICHAR>(*Task->GetDebugString()).Get());
|
||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
@@ -383,7 +383,7 @@ void FCogAbilityWindow_Tasks::RenderTaskOwner(const UGameplayTask* Task)
|
|||||||
OwnerName = GetNameSafe(Object);
|
OwnerName = GetNameSafe(Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Text(StringCast<ANSICHAR>(*OwnerName).Get());
|
ImGui::Text("%s", StringCast<ANSICHAR>(*OwnerName).Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user