diff --git a/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset b/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset deleted file mode 100644 index 996d2a0..0000000 --- a/SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c94c2b19a500d64a8cd53a60e8035a54dd0d9c431c2fd9f381527c342cdf787 -size 181878 diff --git a/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset new file mode 100644 index 0000000..a3ff0b0 --- /dev/null +++ b/SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99d29dfd5a4e6243b43f5e9ce5135aaad50b7d4afcef18be4794cee2a7bbbba9 +size 173797 diff --git a/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset b/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset index 7652b31..f327d43 100644 --- a/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset +++ b/SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8271a597c08b1f383e260f699ac637e759a2edfb0802a06874c5ab1140fe154 -size 18459 +oid sha256:d55866ffecf2601a39117b8f6681b8eb864790ce041870ef2eefec5d4b16d453 +size 18463 diff --git a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineEditor.cpp b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineEditor.cpp index 057461d..2e51ef5 100644 --- a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineEditor.cpp +++ b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineEditor.cpp @@ -1,91 +1,91 @@ -#include "States/SNGStateMachineEditor.h" - -#define LOCTEXT_NAMESPACE "SNGStateMachineEditor" - -const FName SNGStateMachineEditorAppName = FName(TEXT("SNGStateMachineEditorAppName")); - -void FSNGStateMachineEditor::RegisterTabSpawners(const TSharedRef& InTabManager) -{ - /* - WorkspaceMenuCategory = TabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_SNGStateMachineEditor", "SNG State Machine Editor")); - TSharedRef WorkspaceMenuCatRef = WorkspaceMenuCategory.ToSharedRef(); - FAssetEditorToolkit::RegisterTabSpawners(TabManager); - TabManager->RegisterTabSpawner(GraphCanvasTabId, ) - .SetDisplayName(LOCTEXT("GraphCanvasTab", "Graph")) - .SetGroup(WorkspaceMenuCategoryRef) - .SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "GraphEditor.EventGraph_16x")); - - TabManager->RegisterTabSpawner(PropertiesTabId, FOnSpawnTab::CreateSP(this, &FSoundSubmixEditor::SpawnTab_Properties)) - .SetDisplayName(LOCTEXT("PropertiesTab", "Details")) - .SetGroup(WorkspaceMenuCategoryRef) - .SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Details"));\ - */ -} - -void FSNGStateMachineEditor::UnregisterTabSpawners(const TSharedRef& InTabManager) -{ - IStateMachineEditor::UnregisterTabSpawners(InTabManager); -} - -FText FSNGStateMachineEditor::GetBaseToolkitName() const -{ - return LOCTEXT("SNGStateMachineEditorAppLabel", "SNG State Machine Editor"); -} - -FText FSNGStateMachineEditor::GetToolkitName() const -{ - const bool bDirtyState = StateMachineEdited->GetOutermost()->IsDirty(); - - /* - FFormatNamedArguments Args; - Args.Add(TEXT("StateMachineName", FText::FromString(StateMachineEdited->GetName()))); - Args.Add(TEXT("DirtyState"), bDirtyState ? FText::FromString("*") : FText::GetEmpty()); - return FText::Format(LOCTEXT("SNGStateMachineEditorToolkitName", "{StateMachineName}{DirtyState}"), Args); - */ - return FText::FromString(StateMachineEdited->GetName()); -} - -FText FSNGStateMachineEditor::GetToolkitToolTipText() const -{ - return IStateMachineEditor::GetToolkitToolTipText(); -} - -FLinearColor FSNGStateMachineEditor::GetWorldCentricTabColorScale() const -{ - return FLinearColor::Blue; -} - -FString FSNGStateMachineEditor::GetWorldCentricTabPrefix() const -{ - return FString("NOT IMPLEMENTED"); -} - -FString FSNGStateMachineEditor::GetDocumentationLink() const -{ - return IStateMachineEditor::GetDocumentationLink(); -} - -void FSNGStateMachineEditor::SaveAsset_Execute() -{ - FAssetEditorToolkit::SaveAsset_Execute(); -} - -void FSNGStateMachineEditor::SaveAssetAs_Execute() -{ - IStateMachineEditor::SaveAssetAs_Execute(); -} - -void FSNGStateMachineEditor::FocusWindow(UObject* ObjectToFocusOn) -{ - BringToolkitToFront(); - //JumpToObject -} - -void FSNGStateMachineEditor::InitStateMachineEditor(const EToolkitMode::Type Mode, - const TSharedPtr& InitToolkitHost, USNGStateMachine* StateMachine) -{ - StateMachineEdited = StateMachine; - //FAssetEditorToolkit::InitAssetEditor(Mode, InitToolkitHost, SNGStateMachineEditorAppName, , true, true, StateMachine); -} - - +#include "States/SNGStateMachineEditor.h" + +#define LOCTEXT_NAMESPACE "SNGStateMachineEditor" + +const FName SNGStateMachineEditorAppName = FName(TEXT("SNGStateMachineEditorAppName")); + +void FSNGStateMachineEditor::RegisterTabSpawners(const TSharedRef& InTabManager) +{ + /* + WorkspaceMenuCategory = TabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_SNGStateMachineEditor", "SNG State Machine Editor")); + TSharedRef WorkspaceMenuCatRef = WorkspaceMenuCategory.ToSharedRef(); + FAssetEditorToolkit::RegisterTabSpawners(TabManager); + TabManager->RegisterTabSpawner(GraphCanvasTabId, ) + .SetDisplayName(LOCTEXT("GraphCanvasTab", "Graph")) + .SetGroup(WorkspaceMenuCategoryRef) + .SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "GraphEditor.EventGraph_16x")); + + TabManager->RegisterTabSpawner(PropertiesTabId, FOnSpawnTab::CreateSP(this, &FSoundSubmixEditor::SpawnTab_Properties)) + .SetDisplayName(LOCTEXT("PropertiesTab", "Details")) + .SetGroup(WorkspaceMenuCategoryRef) + .SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Details"));\ + */ +} + +void FSNGStateMachineEditor::UnregisterTabSpawners(const TSharedRef& InTabManager) +{ + IStateMachineEditor::UnregisterTabSpawners(InTabManager); +} + +FText FSNGStateMachineEditor::GetBaseToolkitName() const +{ + return LOCTEXT("SNGStateMachineEditorAppLabel", "SNG State Machine Editor"); +} + +FText FSNGStateMachineEditor::GetToolkitName() const +{ + const bool bDirtyState = StateMachineEdited->GetOutermost()->IsDirty(); + + /* + FFormatNamedArguments Args; + Args.Add(TEXT("StateMachineName", FText::FromString(StateMachineEdited->GetName()))); + Args.Add(TEXT("DirtyState"), bDirtyState ? FText::FromString("*") : FText::GetEmpty()); + return FText::Format(LOCTEXT("SNGStateMachineEditorToolkitName", "{StateMachineName}{DirtyState}"), Args); + */ + return FText::FromString(StateMachineEdited->GetName()); +} + +FText FSNGStateMachineEditor::GetToolkitToolTipText() const +{ + return IStateMachineEditor::GetToolkitToolTipText(); +} + +FLinearColor FSNGStateMachineEditor::GetWorldCentricTabColorScale() const +{ + return FLinearColor::Blue; +} + +FString FSNGStateMachineEditor::GetWorldCentricTabPrefix() const +{ + return FString("NOT IMPLEMENTED"); +} + +FString FSNGStateMachineEditor::GetDocumentationLink() const +{ + return IStateMachineEditor::GetDocumentationLink(); +} + +void FSNGStateMachineEditor::SaveAsset_Execute() +{ + FAssetEditorToolkit::SaveAsset_Execute(); +} + +void FSNGStateMachineEditor::SaveAssetAs_Execute() +{ + IStateMachineEditor::SaveAssetAs_Execute(); +} + +void FSNGStateMachineEditor::FocusWindow(UObject* ObjectToFocusOn) +{ + BringToolkitToFront(); + //JumpToObject +} + +void FSNGStateMachineEditor::InitStateMachineEditor(const EToolkitMode::Type Mode, + const TSharedPtr& InitToolkitHost, USNGStateMachine* StateMachine) +{ + StateMachineEdited = StateMachine; + //FAssetEditorToolkit::InitAssetEditor(Mode, InitToolkitHost, SNGStateMachineEditorAppName, , true, true, StateMachine); +} + + diff --git a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineFactory.cpp b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineFactory.cpp index ea6d917..d3f5bf8 100644 Binary files a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineFactory.cpp and b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineFactory.cpp differ diff --git a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineTypeActions.cpp b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineTypeActions.cpp index 7240408..55380f3 100644 Binary files a/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineTypeActions.cpp and b/SwordNGun/Source/SwordNGunEditor/Private/States/SNGStateMachineTypeActions.cpp differ diff --git a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineEditor.h b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineEditor.h index 86a8a52..c211309 100644 --- a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineEditor.h +++ b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineEditor.h @@ -1,43 +1,43 @@ -// Project Sword & Gun Copyright © 2021 Kevin Poretti - -#pragma once - -#include "CoreMinimal.h" -#include "IStateMachineEditor.h" -#include "States/SNGStateMachine.h" -#include "Toolkits/SimpleAssetEditor.h" - -class FSNGStateMachineEditor : public IStateMachineEditor -{ -public: - /** IToolkit Interface */ - virtual void RegisterTabSpawners(const TSharedRef& InTabManager) override; - virtual void UnregisterTabSpawners(const TSharedRef& InTabManager) override; - virtual FText GetBaseToolkitName() const override; - virtual FText GetToolkitName() const override; - virtual FName GetToolkitFName() const override { return FName(TEXT("SNGStateMachineEditor")); } - virtual FText GetToolkitToolTipText() const override; - virtual FLinearColor GetWorldCentricTabColorScale() const override; - virtual FString GetWorldCentricTabPrefix() const override; - - /** FAssetEditorToolkit interface */ - virtual FString GetDocumentationLink() const override; - virtual bool CanSaveAsset() const override { return true; } - virtual bool CanSaveAssetAs() const override { return true; } - virtual void SaveAsset_Execute() override; - virtual void SaveAssetAs_Execute() override; - - /** IAssetEditorInstance interface */ - virtual void FocusWindow(UObject* ObjectToFocusOn = nullptr) override; - - void InitStateMachineEditor(const EToolkitMode::Type Mode, const TSharedPtr& InitToolkitHost, USNGStateMachine* StateMachine); - -private: - /** State machien being edited */ - USNGStateMachine* StateMachineEdited; - - /** Graph Editor */ - TSharedPtr GraphEditorView; - - -}; +// Project Sword & Gun Copyright © 2021 Kevin Poretti + +#pragma once + +#include "CoreMinimal.h" +#include "IStateMachineEditor.h" +#include "States/SNGStateMachine.h" +#include "Toolkits/SimpleAssetEditor.h" + +class FSNGStateMachineEditor : public IStateMachineEditor +{ +public: + /** IToolkit Interface */ + virtual void RegisterTabSpawners(const TSharedRef& InTabManager) override; + virtual void UnregisterTabSpawners(const TSharedRef& InTabManager) override; + virtual FText GetBaseToolkitName() const override; + virtual FText GetToolkitName() const override; + virtual FName GetToolkitFName() const override { return FName(TEXT("SNGStateMachineEditor")); } + virtual FText GetToolkitToolTipText() const override; + virtual FLinearColor GetWorldCentricTabColorScale() const override; + virtual FString GetWorldCentricTabPrefix() const override; + + /** FAssetEditorToolkit interface */ + virtual FString GetDocumentationLink() const override; + virtual bool CanSaveAsset() const override { return true; } + virtual bool CanSaveAssetAs() const override { return true; } + virtual void SaveAsset_Execute() override; + virtual void SaveAssetAs_Execute() override; + + /** IAssetEditorInstance interface */ + virtual void FocusWindow(UObject* ObjectToFocusOn = nullptr) override; + + void InitStateMachineEditor(const EToolkitMode::Type Mode, const TSharedPtr& InitToolkitHost, USNGStateMachine* StateMachine); + +private: + /** State machien being edited */ + USNGStateMachine* StateMachineEdited; + + /** Graph Editor */ + TSharedPtr GraphEditorView; + + +}; diff --git a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineFactory.h b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineFactory.h index f525470..99ff57a 100644 Binary files a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineFactory.h and b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineFactory.h differ diff --git a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineTypeActions.h b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineTypeActions.h index 6f5bea9..845ad8e 100644 Binary files a/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineTypeActions.h and b/SwordNGun/Source/SwordNGunEditor/Public/States/SNGStateMachineTypeActions.h differ