improve inspector

This commit is contained in:
Arnaud Jamin
2023-10-16 00:00:05 -04:00
parent 667439e5fa
commit da02827408
16 changed files with 468 additions and 256 deletions
@@ -1,6 +1,7 @@
#include "CogAbilityWindow_Tags.h"
#include "AbilitySystemComponent.h"
#include "AbilitySystemGlobals.h"
#include "CogAbilityHelper.h"
#include "CogWindowWidgets.h"
@@ -93,12 +94,12 @@ void UCogAbilityWindow_Tags::DrawTag(const UAbilitySystemComponent& AbilitySyste
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogAbilityWindow_Tags::DrawTagContainer(const FString& Title, const UAbilitySystemComponent& AbilitySystemComponent, FGameplayTagContainer& TagContainer)
void UCogAbilityWindow_Tags::DrawTagContainer(const FString& TagContainerName, const UAbilitySystemComponent& AbilitySystemComponent, FGameplayTagContainer& TagContainer)
{
if (ImGui::BeginTable(TCHAR_TO_ANSI(*Title), 2, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize | ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersOuterH | ImGuiTableFlags_BordersOuterV))
if (ImGui::BeginTable(TCHAR_TO_ANSI(*TagContainerName), 2, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_NoBordersInBodyUntilResize | ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersOuterH | ImGuiTableFlags_BordersOuterV))
{
ImGui::TableSetupColumn("Count");
ImGui::TableSetupColumn(TCHAR_TO_ANSI(*Title));
ImGui::TableSetupColumn(TCHAR_TO_ANSI(*TagContainerName));
ImGui::TableHeadersRow();
TArray<FGameplayTag> Tags;
@@ -4,6 +4,10 @@
#include "CogWindow.h"
#include "CogAbilityWindow_Tags.generated.h"
class UAbilitySystemComponent;
struct FGameplayTagContainer;
struct FGameplayTag;
UCLASS()
class COGABILITY_API UCogAbilityWindow_Tags : public UCogWindow
{
@@ -19,7 +23,7 @@ protected:
virtual void RenderContent() override;
virtual void DrawTagContainer(const FString& Title, const UAbilitySystemComponent& AbilitySystemComponent, FGameplayTagContainer& TagContainer);
virtual void DrawTagContainer(const FString& TagContainerName, const UAbilitySystemComponent& AbilitySystemComponent, FGameplayTagContainer& TagContainer);
virtual void DrawTag(const UAbilitySystemComponent& AbilitySystemComponent, const FGameplayTag& Tag);
};