-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganize subsystem categories for future improvements
- Loading branch information
Showing
18 changed files
with
193 additions
and
106 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Editor.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#include "Model/Category/SubsystemBrowserCategory_Editor.h" | ||
#include "EditorSubsystem.h" | ||
|
||
FSubsystemCategory_Editor::FSubsystemCategory_Editor() | ||
{ | ||
Name = TEXT("EditorSubsystemCategory"); | ||
Label = NSLOCTEXT("SubsystemBrowser", "SubsystemBrowser_Editor", "Editor Subsystems"); | ||
SortOrder = 200; | ||
} | ||
|
||
void FSubsystemCategory_Editor::Select(UWorld* InContext, TArray<UObject*>& OutData) const | ||
{ | ||
if (GEditor) | ||
{ | ||
return OutData.Append(GEditor->GetEditorSubsystemArray<UEditorSubsystem>()); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Editor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#pragma once | ||
|
||
#include "Model/SubsystemBrowserCategory.h" | ||
|
||
struct FSubsystemCategory_Editor : public FSubsystemCategory | ||
{ | ||
FSubsystemCategory_Editor(); | ||
virtual void Select(UWorld* InContext, TArray<UObject*>& OutData) const override; | ||
}; |
19 changes: 19 additions & 0 deletions
19
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Engine.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#include "Model/Category/SubsystemBrowserCategory_Engine.h" | ||
#include "Subsystems/EngineSubsystem.h" | ||
|
||
FSubsystemCategory_Engine::FSubsystemCategory_Engine() | ||
{ | ||
Name = TEXT("EngineSubsystemCategory"); | ||
Label = NSLOCTEXT("SubsystemBrowser", "SubsystemBrowser_Engine", "Engine Subsystems"); | ||
SortOrder = 100; | ||
} | ||
|
||
void FSubsystemCategory_Engine::Select(UWorld* InContext, TArray<UObject*>& OutData) const | ||
{ | ||
if (GEngine) | ||
{ | ||
return OutData.Append(GEngine->GetEngineSubsystemArray<UEngineSubsystem>()); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Engine.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#pragma once | ||
|
||
#include "Model/SubsystemBrowserCategory.h" | ||
|
||
struct FSubsystemCategory_Engine : public FSubsystemCategory | ||
{ | ||
FSubsystemCategory_Engine(); | ||
|
||
virtual void Select(UWorld* InContext, TArray<UObject*>& OutData) const override; | ||
}; |
19 changes: 19 additions & 0 deletions
19
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_GameInstance.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#include "Model/Category/SubsystemBrowserCategory_GameInstance.h" | ||
#include "Subsystems/GameInstanceSubsystem.h" | ||
|
||
FSubsystemCategory_GameInstance::FSubsystemCategory_GameInstance() | ||
{ | ||
Name = TEXT("GameInstanceCategory"); | ||
Label = NSLOCTEXT("SubsystemBrowser", "SubsystemBrowser_GameInstance", "Game Instance Subsystems"); | ||
SortOrder = 300; | ||
} | ||
|
||
void FSubsystemCategory_GameInstance::Select(UWorld* InContext, TArray<UObject*>& OutData) const | ||
{ | ||
if (IsValid(InContext) && InContext->GetGameInstance()) | ||
{ | ||
OutData.Append(InContext->GetGameInstance()->GetSubsystemArray<UGameInstanceSubsystem>()); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_GameInstance.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#pragma once | ||
#include "Model/SubsystemBrowserCategory.h" | ||
|
||
struct FSubsystemCategory_GameInstance : public FSubsystemCategory | ||
{ | ||
FSubsystemCategory_GameInstance(); | ||
virtual void Select(UWorld* InContext, TArray<UObject*>& OutData) const override; | ||
}; |
23 changes: 23 additions & 0 deletions
23
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Player.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#include "Model/Category/SubsystemBrowserCategory_Player.h" | ||
#include "Subsystems/LocalPlayerSubsystem.h" | ||
#include "Engine/LocalPlayer.h" | ||
|
||
FSubsystemCategory_Player::FSubsystemCategory_Player() | ||
{ | ||
Name = TEXT("PlayerCategory"); | ||
Label = NSLOCTEXT("SubsystemBrowser", "SubsystemBrowser_Player", "Player Subsystems"); | ||
SortOrder = 500; | ||
} | ||
|
||
void FSubsystemCategory_Player::Select(UWorld* InContext, TArray<UObject*>& OutData) const | ||
{ | ||
if (IsValid(InContext) && InContext->GetGameInstance()) | ||
{ | ||
for (ULocalPlayer* const LocalPlayer : InContext->GetGameInstance()->GetLocalPlayers()) | ||
{ | ||
OutData.Append(LocalPlayer->GetSubsystemArray<ULocalPlayerSubsystem>()); | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_Player.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#pragma once | ||
#include "Model/SubsystemBrowserCategory.h" | ||
|
||
struct FSubsystemCategory_Player: public FSubsystemCategory | ||
{ | ||
FSubsystemCategory_Player(); | ||
virtual void Select(UWorld* InContext, TArray<UObject*>& OutData) const override; | ||
}; |
19 changes: 19 additions & 0 deletions
19
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_World.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#include "Model/Category/SubsystemBrowserCategory_World.h" | ||
#include "Subsystems/WorldSubsystem.h" | ||
|
||
FSubsystemCategory_World::FSubsystemCategory_World() | ||
{ | ||
Name = TEXT("WorldSubsystemCategory"); | ||
Label = NSLOCTEXT("SubsystemBrowser", "SubsystemBrowser_World", "World Subsystems"); | ||
SortOrder = 400; | ||
} | ||
|
||
void FSubsystemCategory_World::Select(UWorld* InContext, TArray<UObject*>& OutData) const | ||
{ | ||
if (IsValid(InContext)) | ||
{ | ||
OutData.Append(InContext->GetSubsystemArray<UWorldSubsystem>()); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Source/SubsystemBrowser/Model/Category/SubsystemBrowserCategory_World.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2022, Aquanox. | ||
|
||
#pragma once | ||
|
||
#include "Model/SubsystemBrowserCategory.h" | ||
|
||
struct FSubsystemCategory_World : public FSubsystemCategory | ||
{ | ||
FSubsystemCategory_World(); | ||
virtual void Select(UWorld* InContext, TArray<UObject*>& OutData) const override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.