├── .gitignore ├── .gitmodules ├── Config ├── DefaultEditor.ini ├── DefaultEditorPerProjectUserSettings.ini ├── DefaultEditorSettings.ini ├── DefaultEngine.ini ├── DefaultGame.ini ├── DefaultInput.ini └── HoloLens │ └── HoloLensEngine.ini ├── Content ├── Art │ ├── BlueIcon.png │ ├── BlueIcon.uasset │ ├── GreenIcon.png │ ├── GreenIcon.uasset │ ├── PlayerCharIcon.png │ ├── PlayerCharIcon.uasset │ ├── RedIcon.png │ ├── RedIcon.uasset │ ├── Sphere.uasset │ ├── WhiteIcon.png │ └── WhiteIcon.uasset ├── Audio │ ├── Collapse01.uasset │ ├── Collapse02.uasset │ ├── Collapse_Cue.uasset │ ├── Explosion01.uasset │ ├── Explosion02.uasset │ ├── Explosion_Cue.uasset │ ├── Fire01.uasset │ ├── Fire01_Cue.uasset │ ├── Fire_Sparks01.uasset │ ├── Fire_Sparks01_Cue.uasset │ ├── Light01.uasset │ ├── Light01_Cue.uasset │ ├── Light02.uasset │ ├── Light02_Cue.uasset │ ├── Smoke01.uasset │ ├── Smoke01_Cue.uasset │ ├── Starter_Background_Cue.uasset │ ├── Starter_Birds01.uasset │ ├── Starter_Music01.uasset │ ├── Starter_Music_Cue.uasset │ ├── Starter_Wind05.uasset │ ├── Starter_Wind06.uasset │ ├── Steam01.uasset │ └── Steam01_Cue.uasset ├── Blueprints │ ├── BP_Dlg_Condition_TalkWithSphere.uasset │ ├── BP_Dlg_EventTalkedWithSphere.uasset │ ├── BP_Dlg_NodeData.uasset │ ├── BP_Dlg_TextArgument_MrCubeName.uasset │ ├── BP_Dlg_TextArgument_Name.uasset │ ├── BP_MrCube.uasset │ ├── BP_MsSphere.uasset │ ├── BP_ThirdPersonCharacter.uasset │ ├── BP_ThirdPersonGameMode.uasset │ ├── Dlg_Data_Struct.uasset │ ├── Dlg_MrCube.uasset │ ├── Dlg_MsSphere.uasset │ ├── UI_Dialogue.uasset │ └── UI_DialogueOption.uasset ├── Geometry │ └── Meshes │ │ ├── 1M_Cube.uasset │ │ ├── 1M_Cube_Chamfer.uasset │ │ ├── Bump_StaticMesh.uasset │ │ ├── CubeMaterial.uasset │ │ ├── LeftArm_StaticMesh.uasset │ │ ├── Linear_Stair_StaticMesh.uasset │ │ ├── RampMaterial.uasset │ │ ├── Ramp_StaticMesh.uasset │ │ ├── RightArm_StaticMesh.uasset │ │ └── TemplateFloor.uasset ├── Mannequin │ ├── Animations │ │ ├── ThirdPersonIdle.uasset │ │ ├── ThirdPersonJump_End.uasset │ │ ├── ThirdPersonJump_Loop.uasset │ │ ├── ThirdPersonJump_Start.uasset │ │ ├── ThirdPersonRun.uasset │ │ ├── ThirdPersonWalk.uasset │ │ ├── ThirdPerson_AnimBP.uasset │ │ ├── ThirdPerson_IdleRun_2D.uasset │ │ └── ThirdPerson_Jump.uasset │ └── Character │ │ ├── Materials │ │ ├── M_UE4Man_Body.uasset │ │ ├── M_UE4Man_ChestLogo.uasset │ │ └── MaterialLayers │ │ │ ├── ML_GlossyBlack_Latex_UE4.uasset │ │ │ ├── ML_Plastic_Shiny_Beige.uasset │ │ │ ├── ML_Plastic_Shiny_Beige_LOGO.uasset │ │ │ ├── ML_SoftMetal_UE4.uasset │ │ │ ├── T_ML_Aluminum01.uasset │ │ │ ├── T_ML_Aluminum01_N.uasset │ │ │ ├── T_ML_Rubber_Blue_01_D.uasset │ │ │ └── T_ML_Rubber_Blue_01_N.uasset │ │ ├── Mesh │ │ ├── SK_Mannequin.uasset │ │ ├── SK_Mannequin_PhysicsAsset.uasset │ │ └── UE4_Mannequin_Skeleton.uasset │ │ └── Textures │ │ ├── UE4Man_Logo_N.uasset │ │ ├── UE4_LOGO_CARD.uasset │ │ ├── UE4_Mannequin_MAT_MASKA.uasset │ │ └── UE4_Mannequin__normals.uasset ├── Maps │ └── ThirdPersonExampleMap.umap ├── Materials │ ├── M_Basic.uasset │ └── M_MIrror.uasset ├── Particles │ ├── Materials │ │ ├── M_Burst.uasset │ │ ├── M_Dust_Particle.uasset │ │ ├── M_Fire_SubUV.uasset │ │ ├── M_Heat_Distortion.uasset │ │ ├── M_Radial_Gradient.uasset │ │ ├── M_Spark.uasset │ │ ├── M_explosion_subUV.uasset │ │ ├── M_radial_ramp.uasset │ │ ├── M_smoke_subUV.uasset │ │ └── m_flare_01.uasset │ ├── P_Ambient_Dust.uasset │ ├── P_Explosion.uasset │ ├── P_Fire.uasset │ ├── P_Smoke.uasset │ ├── P_Sparks.uasset │ └── P_Steam_Lit.uasset └── Textures │ ├── T_Burst_M.uasset │ ├── T_Dust_Particle_D.uasset │ ├── T_Explosion_SubUV.uasset │ ├── T_Fire_SubUV.uasset │ ├── T_Fire_Tiled_D.uasset │ ├── T_Smoke_SubUV.uasset │ ├── T_Smoke_Tiled_D.uasset │ ├── T_Spark_Core.uasset │ ├── T_Water_M.uasset │ └── T_Water_N.uasset ├── Docs └── images │ ├── CompilingMissingModules.jpg │ ├── MissingModules.jpg │ └── VS2017_SettingsInstaller.jpg ├── LICENSE.txt ├── NYDlgSystemExample.png ├── NYDlgSystemExample.uproject ├── Plugins └── DlgSystem │ ├── .editorconfig │ ├── .gitattributes │ ├── .gitconfig │ ├── .gitignore │ ├── Config │ ├── BaseDlgSystem.ini │ ├── DefaultDlgSystem.ini │ └── FilterPlugin.ini │ ├── Content │ ├── Example_BP_Docs.uasset │ ├── Example_BP_Participant.uasset │ ├── Example_Struct_DialogueData.uasset │ └── Icons │ │ ├── Condition_96x.png │ │ ├── DebugTools_40x.png │ │ ├── Dialogue_ShowPrimarySecondaryEdges_40x.png │ │ ├── Discord_96x.png │ │ ├── DlgConditionCustom_16x.png │ │ ├── DlgConditionCustom_64x.png │ │ ├── DlgDialogue_16x.png │ │ ├── DlgDialogue_64x.png │ │ ├── DlgEventCustom_16x.png │ │ ├── DlgEventCustom_64x.png │ │ ├── DlgNodeData_16x.png │ │ ├── DlgNodeData_64x.png │ │ ├── DlgTextArgumentCustom_16x.png │ │ ├── DlgTextArgumentCustom_64x.png │ │ ├── Event_96x.png │ │ ├── Forum_96x.png │ │ ├── Generic_96x.png │ │ ├── LICENSE.txt │ │ ├── Marketplace_96x.png │ │ ├── NotYet_128x_64x.png │ │ ├── NotYet_96x.png │ │ ├── QuestionMark_16x.png │ │ ├── Speaker_96x.png │ │ ├── Wiki_96x.png │ │ └── raw │ │ ├── condition.png │ │ ├── condition_with_conversation.png │ │ ├── conversation.png │ │ ├── data.png │ │ ├── data_with_conversation.png │ │ ├── event.png │ │ ├── event_with_conversation.png │ │ ├── text.png │ │ ├── text_with_conversation.png │ │ └── workspace.kra │ ├── DlgSystem.uplugin │ ├── Docs │ ├── CHANGELOG.md │ ├── EditorTypesExplanation.md │ └── README.md │ ├── LICENSE.txt │ ├── README.md │ ├── Resources │ ├── Icon128.png │ └── LICENSE.txt │ ├── Source │ ├── DlgSystem │ │ ├── DlgCondition.cpp │ │ ├── DlgCondition.h │ │ ├── DlgConditionCustom.h │ │ ├── DlgConstants.h │ │ ├── DlgContext.cpp │ │ ├── DlgContext.h │ │ ├── DlgDialogue.cpp │ │ ├── DlgDialogue.h │ │ ├── DlgDialogueParticipant.h │ │ ├── DlgDialogueParticipantData.cpp │ │ ├── DlgDialogueParticipantData.h │ │ ├── DlgEdge.cpp │ │ ├── DlgEdge.h │ │ ├── DlgEvent.cpp │ │ ├── DlgEvent.h │ │ ├── DlgEventCustom.h │ │ ├── DlgHelper.cpp │ │ ├── DlgHelper.h │ │ ├── DlgLocalizationHelper.cpp │ │ ├── DlgLocalizationHelper.h │ │ ├── DlgManager.cpp │ │ ├── DlgManager.h │ │ ├── DlgMemory.cpp │ │ ├── DlgMemory.h │ │ ├── DlgNodeData.h │ │ ├── DlgObject.cpp │ │ ├── DlgObject.h │ │ ├── DlgParticipantName.h │ │ ├── DlgSystem.Build.cs │ │ ├── DlgSystemModule.cpp │ │ ├── DlgSystemModule.h │ │ ├── DlgSystemSettings.cpp │ │ ├── DlgSystemSettings.h │ │ ├── DlgTextArgument.cpp │ │ ├── DlgTextArgument.h │ │ ├── DlgTextArgumentCustom.h │ │ ├── GameplayDebugger │ │ │ ├── DlgDataDisplayActorProperties.h │ │ │ ├── DlgDataDisplayTreeNode.cpp │ │ │ ├── DlgDataDisplayTreeNode.h │ │ │ ├── DlgGameplayDebuggerCategory.cpp │ │ │ ├── DlgGameplayDebuggerCategory.h │ │ │ ├── SDlgDataDisplay.cpp │ │ │ ├── SDlgDataDisplay.h │ │ │ ├── SDlgDataPropertyValues.cpp │ │ │ └── SDlgDataPropertyValues.h │ │ ├── IDlgEditorAccess.h │ │ ├── IDlgSystemModule.h │ │ ├── IO │ │ │ ├── DlgConfigParser.cpp │ │ │ ├── DlgConfigParser.h │ │ │ ├── DlgConfigWriter.cpp │ │ │ ├── DlgConfigWriter.h │ │ │ ├── DlgJsonParser.cpp │ │ │ ├── DlgJsonParser.h │ │ │ ├── DlgJsonWriter.cpp │ │ │ ├── DlgJsonWriter.h │ │ │ ├── IDlgParser.h │ │ │ └── IDlgWriter.h │ │ ├── Logging │ │ │ ├── DlgLogger.cpp │ │ │ ├── DlgLogger.h │ │ │ ├── INYLogger.cpp │ │ │ └── INYLogger.h │ │ ├── NYEngineVersionHelpers.h │ │ ├── NYReflectionHelper.h │ │ ├── Nodes │ │ │ ├── DlgNode.cpp │ │ │ ├── DlgNode.h │ │ │ ├── DlgNode_Custom.h │ │ │ ├── DlgNode_End.cpp │ │ │ ├── DlgNode_End.h │ │ │ ├── DlgNode_Proxy.cpp │ │ │ ├── DlgNode_Proxy.h │ │ │ ├── DlgNode_Selector.cpp │ │ │ ├── DlgNode_Selector.h │ │ │ ├── DlgNode_Speech.cpp │ │ │ ├── DlgNode_Speech.h │ │ │ ├── DlgNode_SpeechSequence.cpp │ │ │ ├── DlgNode_SpeechSequence.h │ │ │ ├── DlgNode_Start.cpp │ │ │ └── DlgNode_Start.h │ │ ├── Tests │ │ │ ├── DlgIOTester.cpp │ │ │ ├── DlgIOTesterTypes.cpp │ │ │ ├── DlgIOTesterTypes.h │ │ │ ├── DlgTesterHelper.cpp │ │ │ └── DlgTesterHelper.h │ │ └── TreeViewHelpers │ │ │ ├── DlgTreeViewHelper.h │ │ │ ├── DlgTreeViewNode.h │ │ │ ├── DlgTreeViewParticipantProperties.h │ │ │ └── DlgTreeViewVariableProperties.h │ └── DlgSystemEditor │ │ ├── AssetTypeActions │ │ ├── DlgBlueprintDerivedAssetTypeActions.h │ │ ├── DlgDialogueAssetTypeActions.cpp │ │ ├── DlgDialogueAssetTypeActions.h │ │ └── DlgParticipantsAssetTypeActions.h │ │ ├── BlueprintNodes │ │ ├── DialogueK2Node_Redirects.h │ │ ├── DialogueK2Node_Select.cpp │ │ ├── DialogueK2Node_Select.h │ │ ├── DialogueK2Node_SwitchDialogueCallback.cpp │ │ ├── DialogueK2Node_SwitchDialogueCallback.h │ │ ├── DialogueK2Node_SwitchDialogueCallbackVariants.cpp │ │ ├── DialogueK2Node_SwitchDialogueCallbackVariants.h │ │ ├── DlgBlueprintUtilities.h │ │ ├── SGraphNode_DialogueK2Select.cpp │ │ ├── SGraphNode_DialogueK2Select.h │ │ ├── SGraphNode_DialogueK2Switch.cpp │ │ └── SGraphNode_DialogueK2Switch.h │ │ ├── Browser │ │ ├── DialogueTreeProperties │ │ │ ├── DlgBrowserTreeParticipantProperties.h │ │ │ ├── DlgBrowserTreeVariableProperties.cpp │ │ │ └── DlgBrowserTreeVariableProperties.h │ │ ├── DlgBrowserTreeNode.cpp │ │ ├── DlgBrowserTreeNode.h │ │ ├── DlgBrowserUtilities.cpp │ │ ├── DlgBrowserUtilities.h │ │ ├── SDlgBrowser.cpp │ │ └── SDlgBrowser.h │ │ ├── Commandlets │ │ ├── DlgCommandletHelper.h │ │ ├── DlgExportTwineCommandlet.cpp │ │ ├── DlgExportTwineCommandlet.h │ │ ├── DlgHumanReadableTextCommandlet.cpp │ │ ├── DlgHumanReadableTextCommandlet.h │ │ ├── DlgStatsCommandlet.cpp │ │ └── DlgStatsCommandlet.h │ │ ├── DlgCommands.cpp │ │ ├── DlgCommands.h │ │ ├── DlgContentBrowserExtensions.cpp │ │ ├── DlgContentBrowserExtensions.h │ │ ├── DlgEditorAccess.cpp │ │ ├── DlgEditorAccess.h │ │ ├── DlgEditorUtilities.cpp │ │ ├── DlgEditorUtilities.h │ │ ├── DlgStyle.cpp │ │ ├── DlgStyle.h │ │ ├── DlgSystemEditor.Build.cs │ │ ├── DlgSystemEditorModule.cpp │ │ ├── DlgSystemEditorModule.h │ │ ├── DlgThumbnailRenderer.cpp │ │ ├── DlgThumbnailRenderer.h │ │ ├── Editor │ │ ├── DetailsPanel │ │ │ ├── DlgAsset_Details.cpp │ │ │ ├── DlgAsset_Details.h │ │ │ ├── DlgCondition_Details.cpp │ │ │ ├── DlgCondition_Details.h │ │ │ ├── DlgDetailsPanelUtils.cpp │ │ │ ├── DlgDetailsPanelUtils.h │ │ │ ├── DlgEdge_Details.cpp │ │ │ ├── DlgEdge_Details.h │ │ │ ├── DlgEvent_Details.cpp │ │ │ ├── DlgEvent_Details.h │ │ │ ├── DlgGraphNode_Details.cpp │ │ │ ├── DlgGraphNode_Details.h │ │ │ ├── DlgNode_Details.cpp │ │ │ ├── DlgNode_Details.h │ │ │ ├── DlgParticipantName_Details.cpp │ │ │ ├── DlgParticipantName_Details.h │ │ │ ├── DlgSpeechSequenceEntry_Details.cpp │ │ │ ├── DlgSpeechSequenceEntry_Details.h │ │ │ ├── DlgTextArgument_Details.cpp │ │ │ ├── DlgTextArgument_Details.h │ │ │ └── Widgets │ │ │ │ ├── DlgBase_CustomRowHelper.cpp │ │ │ │ ├── DlgBase_CustomRowHelper.h │ │ │ │ ├── DlgEditableTextPropertyHandle.h │ │ │ │ ├── DlgEnumTypeWithObject_CustomRowHelper.cpp │ │ │ │ ├── DlgEnumTypeWithObject_CustomRowHelper.h │ │ │ │ ├── DlgIntTextBox_CustomRowHelper.cpp │ │ │ │ ├── DlgIntTextBox_CustomRowHelper.h │ │ │ │ ├── DlgMultiLineEditableTextBox_CustomRowHelper.cpp │ │ │ │ ├── DlgMultiLineEditableTextBox_CustomRowHelper.h │ │ │ │ ├── DlgObject_CustomRowHelper.cpp │ │ │ │ ├── DlgObject_CustomRowHelper.h │ │ │ │ ├── DlgTextPropertyPickList_CustomRowHelper.cpp │ │ │ │ ├── DlgTextPropertyPickList_CustomRowHelper.h │ │ │ │ ├── SDlgTextPropertyEditableTextBox.cpp │ │ │ │ ├── SDlgTextPropertyEditableTextBox.h │ │ │ │ ├── SDlgTextPropertyPickList.cpp │ │ │ │ └── SDlgTextPropertyPickList.h │ │ ├── DlgCompiler.cpp │ │ ├── DlgCompiler.h │ │ ├── DlgEditor.cpp │ │ ├── DlgEditor.h │ │ ├── Graph │ │ │ ├── DialogueGraph.cpp │ │ │ ├── DialogueGraph.h │ │ │ ├── DialogueGraphSchema.cpp │ │ │ ├── DialogueGraphSchema.h │ │ │ ├── DlgGraphConnectionDrawingPolicy.cpp │ │ │ ├── DlgGraphConnectionDrawingPolicy.h │ │ │ └── SchemaActions │ │ │ │ ├── DlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction.cpp │ │ │ │ ├── DlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction.h │ │ │ │ ├── DlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction.cpp │ │ │ │ ├── DlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction.h │ │ │ │ ├── DlgNewComment_GraphSchemaAction.cpp │ │ │ │ ├── DlgNewComment_GraphSchemaAction.h │ │ │ │ ├── DlgNewNode_GraphSchemaAction.cpp │ │ │ │ └── DlgNewNode_GraphSchemaAction.h │ │ ├── IDlgEditor.h │ │ ├── Nodes │ │ │ ├── DialogueGraphNode.cpp │ │ │ ├── DialogueGraphNode.h │ │ │ ├── DialogueGraphNode_Base.cpp │ │ │ ├── DialogueGraphNode_Base.h │ │ │ ├── DialogueGraphNode_Edge.cpp │ │ │ ├── DialogueGraphNode_Edge.h │ │ │ ├── DialogueGraphNode_Root.cpp │ │ │ ├── DialogueGraphNode_Root.h │ │ │ ├── SDlgGraphNode.cpp │ │ │ ├── SDlgGraphNode.h │ │ │ ├── SDlgGraphNode_Base.cpp │ │ │ ├── SDlgGraphNode_Base.h │ │ │ ├── SDlgGraphNode_Edge.cpp │ │ │ ├── SDlgGraphNode_Edge.h │ │ │ ├── SDlgGraphNode_Root.cpp │ │ │ ├── SDlgGraphNode_Root.h │ │ │ ├── SDlgGraphPin.cpp │ │ │ ├── SDlgGraphPin.h │ │ │ ├── SDlgNodeOverlayWidget.cpp │ │ │ └── SDlgNodeOverlayWidget.h │ │ ├── SDlgDialogueActionMenu.cpp │ │ ├── SDlgDialogueActionMenu.h │ │ ├── SDlgEditorPalette.cpp │ │ └── SDlgEditorPalette.h │ │ ├── Factories │ │ ├── DlgAssetFactory.cpp │ │ ├── DlgAssetFactory.h │ │ ├── DlgClassViewerFilters.h │ │ ├── DlgConditionCustomFactory.cpp │ │ ├── DlgConditionCustomFactory.h │ │ ├── DlgEventCustomFactory.cpp │ │ ├── DlgEventCustomFactory.h │ │ ├── DlgGraphFactories.cpp │ │ ├── DlgGraphFactories.h │ │ ├── DlgNodeDataFactory.cpp │ │ ├── DlgNodeDataFactory.h │ │ ├── DlgTextArgumentCustomFactory.cpp │ │ └── DlgTextArgumentCustomFactory.h │ │ ├── IDlgSystemEditorModule.h │ │ └── Search │ │ ├── DlgSearchManager.cpp │ │ ├── DlgSearchManager.h │ │ ├── DlgSearchResult.cpp │ │ ├── DlgSearchResult.h │ │ ├── DlgSearchUtilities.cpp │ │ ├── DlgSearchUtilities.h │ │ ├── SDlgFindInDialogues.cpp │ │ └── SDlgFindInDialogues.h │ └── Tools │ ├── DlgSpellcheckJsonHumanText.py │ └── DlgTwineToJsonHumanText.py ├── README.md └── git-update.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio 2015 user specific files 2 | .vs/ 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | 22 | # Compiled Static libraries 23 | *.lai 24 | *.la 25 | *.a 26 | *.lib 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | *.ipa 33 | 34 | # These project files can be generated by the engine 35 | *.xcodeproj 36 | *.xcworkspace 37 | *.sln 38 | *.suo 39 | *.opensdf 40 | *.sdf 41 | *.VC.db 42 | *.VC.opendb 43 | 44 | # Precompiled Assets 45 | SourceArt/**/*.png 46 | SourceArt/**/*.tga 47 | 48 | # Binary Files 49 | Binaries/* 50 | Plugins/*/Binaries/* 51 | 52 | # Builds 53 | Build/* 54 | 55 | # Whitelist PakBlacklist-.txt files 56 | !Build/*/ 57 | Build/*/** 58 | !Build/*/PakBlacklist*.txt 59 | 60 | # Don't ignore icon files in Build 61 | !Build/**/*.ico 62 | 63 | # Built data for maps 64 | *_BuiltData.uasset 65 | 66 | # Configuration files generated by the Editor 67 | Saved/* 68 | 69 | # Compiled source files for the engine to use 70 | Intermediate/* 71 | Plugins/*/Intermediate/* 72 | 73 | # Cache files for the editor to use 74 | DerivedDataCache/* 75 | DerivedDataCacheLocal/* 76 | 77 | Packaged/* 78 | Tools 79 | Content/StarterContent/* 80 | .vscode/ 81 | *.code-workspace 82 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/.gitmodules -------------------------------------------------------------------------------- /Config/DefaultEditor.ini: -------------------------------------------------------------------------------- 1 | [UnrealEd.SimpleMap] 2 | SimpleMapName=/Game/TP_ThirdPerson/Maps/ThirdPersonExampleMap 3 | 4 | [EditoronlyBP] 5 | bAllowClassAndBlueprintPinMatching=true 6 | bReplaceBlueprintWithClass= true 7 | bDontLoadBlueprintOutsideEditor= true 8 | bBlueprintIsNotBlueprintType= true -------------------------------------------------------------------------------- /Config/DefaultEditorPerProjectUserSettings.ini: -------------------------------------------------------------------------------- 1 | [ContentBrowser] 2 | ContentBrowserTab1.SelectedPaths=/Game/Blueprints 3 | 4 | [/Script/UnrealEd.EditorLoadingSavingSettings] 5 | bForceCompilationAtStartup=True 6 | 7 | [PathColor] 8 | /Game/Blueprints=(R=1.000000,G=0.000000,B=0.000000,A=1.000000) 9 | -------------------------------------------------------------------------------- /Config/DefaultEditorSettings.ini: -------------------------------------------------------------------------------- 1 | [/Script/SourceCodeAccess.SourceCodeAccessSettings] 2 | PreferredAccessor=VisualStudio2022 3 | -------------------------------------------------------------------------------- /Config/DefaultGame.ini: -------------------------------------------------------------------------------- 1 | [/Script/EngineSettings.GeneralProjectSettings] 2 | ProjectID=8AF7A6514CD6810C42BF7DAE1242FEFD 3 | ProjectName=Not Yet Dialogue System Example Project 4 | SupportContact="https://gitlab.com/NotYetGames/DlgSystem" 5 | Homepage="https://gitlab.com/NotYetGames/DlgSystem" 6 | CompanyName=Not Yet 7 | CompanyDistinguishedName=Not Yet 8 | Description=Example project for the Dialogue System Plugin 9 | 10 | -------------------------------------------------------------------------------- /Config/HoloLens/HoloLensEngine.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | [/Script/HoloLensPlatformEditor.HoloLensTargetSettings] 4 | bBuildForEmulation=False 5 | bBuildForDevice=True 6 | bUseNameForLogo=True 7 | bBuildForRetailWindowsStore=False 8 | bAutoIncrementVersion=False 9 | bShouldCreateAppInstaller=False 10 | AppInstallerInstallationURL= 11 | HoursBetweenUpdateChecks=0 12 | bEnablePIXProfiling=False 13 | TileBackgroundColor=(B=64,G=0,R=0,A=255) 14 | SplashScreenBackgroundColor=(B=64,G=0,R=0,A=255) 15 | +PerCultureResources=(CultureId="",Strings=(PackageDisplayName="",PublisherDisplayName="",PackageDescription="",ApplicationDisplayName="",ApplicationDescription=""),Images=()) 16 | TargetDeviceFamily=Windows.Holographic 17 | MinimumPlatformVersion= 18 | MaximumPlatformVersionTested=10.0.18362.0 19 | MaxTrianglesPerCubicMeter=500.000000 20 | SpatialMeshingVolumeSize=20.000000 21 | CompilerVersion=Default 22 | Windows10SDKVersion=10.0.18362.0 23 | +CapabilityList=internetClientServer 24 | +CapabilityList=privateNetworkClientServer 25 | +Uap2CapabilityList=spatialPerception 26 | bSetDefaultCapabilities=False 27 | SpatializationPlugin= 28 | ReverbPlugin= 29 | OcclusionPlugin= 30 | SoundCueCookQualityIndex=-1 31 | 32 | -------------------------------------------------------------------------------- /Content/Art/BlueIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/BlueIcon.png -------------------------------------------------------------------------------- /Content/Art/BlueIcon.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/BlueIcon.uasset -------------------------------------------------------------------------------- /Content/Art/GreenIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/GreenIcon.png -------------------------------------------------------------------------------- /Content/Art/GreenIcon.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/GreenIcon.uasset -------------------------------------------------------------------------------- /Content/Art/PlayerCharIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/PlayerCharIcon.png -------------------------------------------------------------------------------- /Content/Art/PlayerCharIcon.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/PlayerCharIcon.uasset -------------------------------------------------------------------------------- /Content/Art/RedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/RedIcon.png -------------------------------------------------------------------------------- /Content/Art/RedIcon.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/RedIcon.uasset -------------------------------------------------------------------------------- /Content/Art/Sphere.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/Sphere.uasset -------------------------------------------------------------------------------- /Content/Art/WhiteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/WhiteIcon.png -------------------------------------------------------------------------------- /Content/Art/WhiteIcon.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Art/WhiteIcon.uasset -------------------------------------------------------------------------------- /Content/Audio/Collapse01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Collapse01.uasset -------------------------------------------------------------------------------- /Content/Audio/Collapse02.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Collapse02.uasset -------------------------------------------------------------------------------- /Content/Audio/Collapse_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Collapse_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Explosion01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Explosion01.uasset -------------------------------------------------------------------------------- /Content/Audio/Explosion02.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Explosion02.uasset -------------------------------------------------------------------------------- /Content/Audio/Explosion_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Explosion_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Fire01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Fire01.uasset -------------------------------------------------------------------------------- /Content/Audio/Fire01_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Fire01_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Fire_Sparks01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Fire_Sparks01.uasset -------------------------------------------------------------------------------- /Content/Audio/Fire_Sparks01_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Fire_Sparks01_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Light01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Light01.uasset -------------------------------------------------------------------------------- /Content/Audio/Light01_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Light01_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Light02.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Light02.uasset -------------------------------------------------------------------------------- /Content/Audio/Light02_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Light02_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Smoke01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Smoke01.uasset -------------------------------------------------------------------------------- /Content/Audio/Smoke01_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Smoke01_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Background_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Background_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Birds01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Birds01.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Music01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Music01.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Music_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Music_Cue.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Wind05.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Wind05.uasset -------------------------------------------------------------------------------- /Content/Audio/Starter_Wind06.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Starter_Wind06.uasset -------------------------------------------------------------------------------- /Content/Audio/Steam01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Steam01.uasset -------------------------------------------------------------------------------- /Content/Audio/Steam01_Cue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Audio/Steam01_Cue.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_Dlg_Condition_TalkWithSphere.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_Dlg_Condition_TalkWithSphere.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_Dlg_EventTalkedWithSphere.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_Dlg_EventTalkedWithSphere.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_Dlg_NodeData.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_Dlg_NodeData.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_Dlg_TextArgument_MrCubeName.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_Dlg_TextArgument_MrCubeName.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_Dlg_TextArgument_Name.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_Dlg_TextArgument_Name.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_MrCube.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_MrCube.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_MsSphere.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_MsSphere.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_ThirdPersonCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_ThirdPersonCharacter.uasset -------------------------------------------------------------------------------- /Content/Blueprints/BP_ThirdPersonGameMode.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/BP_ThirdPersonGameMode.uasset -------------------------------------------------------------------------------- /Content/Blueprints/Dlg_Data_Struct.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/Dlg_Data_Struct.uasset -------------------------------------------------------------------------------- /Content/Blueprints/Dlg_MrCube.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/Dlg_MrCube.uasset -------------------------------------------------------------------------------- /Content/Blueprints/Dlg_MsSphere.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/Dlg_MsSphere.uasset -------------------------------------------------------------------------------- /Content/Blueprints/UI_Dialogue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/UI_Dialogue.uasset -------------------------------------------------------------------------------- /Content/Blueprints/UI_DialogueOption.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Blueprints/UI_DialogueOption.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/1M_Cube.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube_Chamfer.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/1M_Cube_Chamfer.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/Bump_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/Bump_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/CubeMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/CubeMaterial.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/LeftArm_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/LeftArm_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/Linear_Stair_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/Linear_Stair_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/RampMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/RampMaterial.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/Ramp_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/Ramp_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/RightArm_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/RightArm_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/TemplateFloor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Geometry/Meshes/TemplateFloor.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonIdle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonIdle.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_End.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonJump_End.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Start.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonJump_Start.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonRun.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonRun.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonWalk.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPersonWalk.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_Jump.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Animations/ThirdPerson_Jump.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_UE4Man_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/M_UE4Man_Body.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Mesh/SK_Mannequin.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/UE4Man_Logo_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Textures/UE4Man_Logo_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/UE4_LOGO_CARD.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Textures/UE4_LOGO_CARD.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/UE4_Mannequin_MAT_MASKA.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Textures/UE4_Mannequin_MAT_MASKA.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/UE4_Mannequin__normals.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Mannequin/Character/Textures/UE4_Mannequin__normals.uasset -------------------------------------------------------------------------------- /Content/Maps/ThirdPersonExampleMap.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Maps/ThirdPersonExampleMap.umap -------------------------------------------------------------------------------- /Content/Materials/M_Basic.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Materials/M_Basic.uasset -------------------------------------------------------------------------------- /Content/Materials/M_MIrror.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Materials/M_MIrror.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Burst.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Burst.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Dust_Particle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Dust_Particle.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Fire_SubUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Fire_SubUV.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Heat_Distortion.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Heat_Distortion.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Radial_Gradient.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Radial_Gradient.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_Spark.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_Spark.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_explosion_subUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_explosion_subUV.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_radial_ramp.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_radial_ramp.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/M_smoke_subUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/M_smoke_subUV.uasset -------------------------------------------------------------------------------- /Content/Particles/Materials/m_flare_01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/Materials/m_flare_01.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Ambient_Dust.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Ambient_Dust.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Explosion.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Explosion.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Fire.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Fire.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Smoke.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Smoke.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Sparks.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Sparks.uasset -------------------------------------------------------------------------------- /Content/Particles/P_Steam_Lit.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Particles/P_Steam_Lit.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Burst_M.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Burst_M.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Dust_Particle_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Dust_Particle_D.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Explosion_SubUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Explosion_SubUV.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Fire_SubUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Fire_SubUV.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Fire_Tiled_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Fire_Tiled_D.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Smoke_SubUV.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Smoke_SubUV.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Smoke_Tiled_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Smoke_Tiled_D.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Spark_Core.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Spark_Core.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Water_M.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Water_M.uasset -------------------------------------------------------------------------------- /Content/Textures/T_Water_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Content/Textures/T_Water_N.uasset -------------------------------------------------------------------------------- /Docs/images/CompilingMissingModules.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Docs/images/CompilingMissingModules.jpg -------------------------------------------------------------------------------- /Docs/images/MissingModules.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Docs/images/MissingModules.jpg -------------------------------------------------------------------------------- /Docs/images/VS2017_SettingsInstaller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Docs/images/VS2017_SettingsInstaller.jpg -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Csaba Molnar & Daniel Butum. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NYDlgSystemExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/NYDlgSystemExample.png -------------------------------------------------------------------------------- /NYDlgSystemExample.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "EngineAssociation": "5.2", 4 | "Category": "", 5 | "Description": "", 6 | "Plugins": [ 7 | { 8 | "Name": "DlgSystem", 9 | "Enabled": true, 10 | "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/6d0255a60be340dfa1c556503cc57eb3" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://EditorConfig.org 2 | # See Plugin for VS: https://github.com/editorconfig/editorconfig-visualstudio 3 | # Other editors: http://editorconfig.org/#download 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | [*] 9 | # Unix-style newlines with a newline ending every file 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | max_line_length = 140 14 | 15 | # Tab with 4 spaces. 16 | indent_style = tab 17 | indent_size = 4 18 | tab_width = 4 19 | charset = utf-8 20 | 21 | # MSBuild 22 | [*.{csproj,proj,projitems,shproj,fsproj,target,props}] 23 | indent_style = space 24 | indent_size = 2 25 | 26 | # Bash/Python files 27 | [*.py] 28 | indent_style = space 29 | indent_size = 4 30 | end_of_line = lf 31 | charset = utf-8 32 | 33 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/.gitattributes: -------------------------------------------------------------------------------- 1 | # Let git use LF in git and automatic line endings in the OS 2 | * text=auto 3 | 4 | # if something breaks again, add -text to see line endings in diff 5 | *.dlg diff text 6 | *.ini text 7 | 8 | # Declare files that will always have CRLF line endings on checkout. 9 | *.sln text eol=crlf 10 | 11 | #sources 12 | *.c text 13 | *.cc text 14 | *.cxx text 15 | *.cpp text 16 | *.c++ text 17 | *.hpp text 18 | *.h text 19 | *.h++ text 20 | *.hh text 21 | 22 | # Compiled Object files 23 | *.slo binary 24 | *.lo binary 25 | *.o binary 26 | *.obj binary 27 | 28 | # Precompiled Headers 29 | *.gch binary 30 | *.pch binary 31 | 32 | # Compiled Dynamic libraries 33 | *.so binary 34 | *.dylib binary 35 | *.dll binary 36 | 37 | # Compiled Static libraries 38 | *.lai binary 39 | *.la binary 40 | *.a binary 41 | *.lib binary 42 | 43 | # Executables 44 | *.exe binary 45 | *.out binary 46 | *.app binary 47 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = true 3 | autocrlf = input 4 | eol = lf 5 | [color "diff"] 6 | whitespace = red reverse 7 | 8 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/.gitignore: -------------------------------------------------------------------------------- 1 | ## Inspired from https://github.com/github/gitignore/blob/master/UnrealEngine.gitignore 2 | # Visual Studio user specific files 3 | .vs/ 4 | enc_temp_folder/ 5 | 6 | # Compiled Object files 7 | *.slo 8 | *.lo 9 | *.o 10 | *.obj 11 | 12 | # Precompiled Headers 13 | *.gch 14 | *.pch 15 | *.ipch 16 | 17 | # Compiled Dynamic libraries 18 | *.so 19 | *.dylib 20 | *.dll 21 | 22 | # Fortran module files 23 | *.mod 24 | 25 | # Compiled Static libraries 26 | *.lai 27 | *.la 28 | *.a 29 | *.lib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.ipa 36 | 37 | # These project files can be generated by the engine 38 | *.xcodeproj 39 | *.sln 40 | *.suo 41 | *.user 42 | *.opensdf 43 | *.sdf 44 | *.VC.db 45 | *.opendb 46 | *.vcxproj* 47 | *.gen.cpp 48 | *.generated.h 49 | 50 | # Precompiled Assets 51 | SourceArt/**/*.png 52 | SourceArt/**/*.tga 53 | 54 | # Ignore builds, binary, configuration, cache and starter content directories 55 | Build/ 56 | Binaries/ 57 | Saved/ 58 | Intermediate/ 59 | 60 | DerivedDataCache/ 61 | Content/StarterContent/ 62 | Content/ExampleContent/ 63 | Content/TempTree/ 64 | 65 | # Don't ignore icon files in Build 66 | !Build/**/*.ico 67 | 68 | # Other IDE's stuff and linux/mac 69 | .codelite/ 70 | .idea/ 71 | .vscode/ 72 | .kdev4/ 73 | cmake-*/ 74 | *.kdev4 75 | *.workspace 76 | *.code-workspace 77 | *.pri 78 | *.pro 79 | *CodeCompletionFolders.txt 80 | *CodeLitePreProcessor.txt 81 | CMakeLists.txt 82 | Makefile 83 | core 84 | .gdb_history 85 | Config/QuickSave_1.txt 86 | Config/QuickSave_0.txt 87 | *.autosave 88 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | /Docs/*.md 6 | /Tools/*.py 7 | /Config/ 8 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Example_BP_Docs.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Example_BP_Docs.uasset -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Example_BP_Participant.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Example_BP_Participant.uasset -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Example_Struct_DialogueData.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Example_Struct_DialogueData.uasset -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Condition_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Condition_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DebugTools_40x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DebugTools_40x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Dialogue_ShowPrimarySecondaryEdges_40x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Dialogue_ShowPrimarySecondaryEdges_40x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Discord_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Discord_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgConditionCustom_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgConditionCustom_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgConditionCustom_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgConditionCustom_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgDialogue_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgDialogue_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgDialogue_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgDialogue_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgEventCustom_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgEventCustom_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgEventCustom_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgEventCustom_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgNodeData_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgNodeData_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgNodeData_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgNodeData_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgTextArgumentCustom_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgTextArgumentCustom_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/DlgTextArgumentCustom_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/DlgTextArgumentCustom_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Event_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Event_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Forum_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Forum_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Generic_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Generic_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/LICENSE.txt: -------------------------------------------------------------------------------- 1 | DlgDialogue_64x.png | DlgDialogue_16x.png - http://game-icons.net/lorc/originals/conversation.html 2 | DlgNodeData_64x.png | DlgNodeData_16x.png - https://thenounproject.com/search/?q=data&i=2556692 3 | Event_96x.png | DlgEventCustom_64x.png | DlgEventCustom_16x.png - https://thenounproject.com/search/?q=event&i=1757908 4 | Condition_96x.png | DlgConditionCustom_64x.png | DlgConditionCustom_16x.png - https://thenounproject.com/term/correct-answer/152639/ 5 | DlgTextArgumentCustom_64x.png | DlgTextArgumentCustom_16x.png - https://thenounproject.com/search/?q=text&i=646000 6 | QuestionMark_16x.png - http://game-icons.net/lorc/originals/uncertainty.html 7 | Speaker_96x.png - http://game-icons.net/delapouite/gui/speaker.html 8 | Dialogue_ShowPrimarySecondaryEdges_40x.png - https://thenounproject.com/ArtZ91/collection/strategy/?i=152647 9 | Discord_96x.png - https://discord.com/new/branding 10 | NotYet_96x.png | NotYet_128x_64x.png - https://www.warriorb.com/presskit/warriorb/ 11 | Forum_96x.png - https://thenounproject.com/search/?q=forum&i=1871927 12 | Marketplace_96x.png - https://thenounproject.com/search/?q=marketplace&i=1257504 13 | Wiki_96x.png - https://thenounproject.com/search/?q=book&i=2044267 14 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Marketplace_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Marketplace_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/NotYet_128x_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/NotYet_128x_64x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/NotYet_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/NotYet_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/QuestionMark_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/QuestionMark_16x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Speaker_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Speaker_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/Wiki_96x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/Wiki_96x.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/condition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/condition.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/condition_with_conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/condition_with_conversation.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/conversation.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/data.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/data_with_conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/data_with_conversation.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/event.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/event_with_conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/event_with_conversation.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/text.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/text_with_conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/text_with_conversation.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Content/Icons/raw/workspace.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Content/Icons/raw/workspace.kra -------------------------------------------------------------------------------- /Plugins/DlgSystem/DlgSystem.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 17, 4 | "VersionName": "17.0.0", 5 | "EngineVersion" : "ANY_VERSION", 6 | "FriendlyName": "Not Yet: Dialogue System", 7 | "Description": "Dialogue system (with text based dialogues) and nice Editor for editing dialogues", 8 | "Category": "Misc", 9 | "CreatedBy": "Not Yet", 10 | "CreatedByURL": "https://bit.ly/NYMarketplaceEditor", 11 | "DocsURL": "https://bit.ly/DlgWikiEditor", 12 | "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/6d0255a60be340dfa1c556503cc57eb3", 13 | "SupportURL": "https://bit.ly/NYDlgSystemSource", 14 | "CanContainContent": true, 15 | "IsBetaVersion": false, 16 | "Installed": false, 17 | "EnabledByDefault": true, 18 | "Modules": [ 19 | { 20 | "Name": "DlgSystem", 21 | "Type": "Runtime", 22 | "LoadingPhase": "PreDefault", 23 | "WhitelistPlatforms": 24 | [ 25 | "Win64", 26 | "Linux", 27 | "Mac", 28 | "Android", 29 | "IOS", 30 | "TVOS" 31 | ] 32 | }, 33 | { 34 | "Name": "DlgSystemEditor", 35 | "Type": "UncookedOnly", 36 | "LoadingPhase": "PreDefault", 37 | "WhitelistPlatforms": ["Win64", "Linux", "Mac"] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Docs/EditorTypesExplanation.md: -------------------------------------------------------------------------------- 1 | # Editor explanations of types that you can extend to make your plugin more awesome 2 | 3 | ## `UActorFactory` 4 | When you have an asset in the content browser and you want to drag it out on the level editor, how should that happen? 5 | 6 | ## `IComponentAssetBroker` 7 | When you drag from the content browser to the blueprint how does it know to go from the asset to the component in the blueprint? 8 | 9 | ## `UFactory` 10 | Create a new class from "new" or "import" 11 | 12 | ## `FAssetTypeActions_Base` or `IAssetTypeActions` 13 | 14 | How the editor interacts with that asset in the content browser: 15 | - color that shows at the bottom 16 | - category it will show in (in filters and create new) 17 | - what editor is opened 18 | 19 | You must create a UFactory for this object type if you want it to appear in the new or import menu. 20 | 21 | ## `UThumbnailRenderer` or `UDefaultSizedThumbnailRenderer` 22 | The default icon that you see for the asset instead of the asset color and name which is the default. 23 | 24 | ## `FEditorViewportClient` 25 | Viewport client for editor viewports. Contains common functionality for camera movement, rendering debug information. 26 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Docs/README.md: -------------------------------------------------------------------------------- 1 | # Dialogue System 2 | 3 | **[🐛 CHANGELOG HERE](./CHANGELOG.md)** 4 | 5 | Brought to you by Not Yet: 6 | * [💬 Discord](https://bit.ly/NYDiscord) 7 | * [🔢 Plugin Source Code](https://bit.ly/DlgSource) 8 | * [🛒 Plugin Marketplace](https://bit.ly/DlgMarketplace) 9 | * [📖 Wiki/Documentation](https://bit.ly/DlgWiki) 10 | * [Plugin Forum post](https://bit.ly/DlgForum) 11 | * Website: [warriorb.com](http://www.warriorb.com) 12 | * [Twitter]( https://twitter.com/NotYetDevs) 13 | 14 | 15 | 16 | 17 | ## Modules dependency 18 | 19 | ```mermaid 20 | graph TD; 21 | A[DlgSystemEditor]-->B[UnrealEd]; 22 | A-->C[DlgSystem]; 23 | C-. WITH_EDITOR .->B; 24 | C-. WITH_EDITOR using IDlgDialogueEditorAccess .->A 25 | ``` 26 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Csaba Molnar & Daniel Butum. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NotYetGames/NotYetDlgSystemExample/a6429bf6d2569120908a6a8035739449fe87a4db/Plugins/DlgSystem/Resources/Icon128.png -------------------------------------------------------------------------------- /Plugins/DlgSystem/Resources/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Icon128.png from http://game-icons.net/lorc/originals/conversation.html 2 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgConditionCustom.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "DlgObject.h" 4 | 5 | #include "DlgConditionCustom.generated.h" 6 | 7 | class UDlgContext; 8 | 9 | // Abstract base class for a custom condition 10 | // Extend this class to define additional data you want to store 11 | // 12 | // 1. Override IsConditionMet 13 | // 2. Return true if you want the condition to succeed or false otherwise 14 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew) 15 | class DLGSYSTEM_API UDlgConditionCustom : public UDlgObject 16 | { 17 | GENERATED_BODY() 18 | public: 19 | // Checks if the condition is met 20 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue") 21 | bool IsConditionMet(const UDlgContext* Context, const UObject* Participant); 22 | virtual bool IsConditionMet_Implementation(const UDlgContext* Context, const UObject* Participant) 23 | { 24 | return false; 25 | } 26 | 27 | // Display text for editor graph node 28 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue") 29 | FString GetEditorDisplayString(UDlgDialogue* OwnerDialogue, FName ParticipantName); 30 | virtual FString GetEditorDisplayString_Implementation(UDlgDialogue* OwnerDialogue, FName ParticipantName) 31 | { 32 | const FString TargetPreFix = ParticipantName != NAME_None ? FString::Printf(TEXT("[%s] "), *ParticipantName.ToString()) : TEXT(""); 33 | #if WITH_EDITOR 34 | return TargetPreFix + GetClass()->GetDisplayNameText().ToString(); 35 | #else 36 | return TargetPreFix + GetName(); 37 | #endif 38 | } 39 | }; 40 | 41 | // This is the same as UDlgConditionCustom but it does NOT show the categories 42 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew, CollapseCategories) 43 | class DLGSYSTEM_API UDlgConditionCustomHideCategories : public UDlgConditionCustom 44 | { 45 | GENERATED_BODY() 46 | }; 47 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgConstants.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | static const FName DIALOGUE_SYSTEM_MENU_CATEGORY_KEY(TEXT("Dialogue System")); 7 | static const FText DIALOGUE_SYSTEM_MENU_CATEGORY_KEY_TEXT(NSLOCTEXT("DlgSystemEditor", "DlgSystemAssetCategory", "Dialogue System")); 8 | 9 | static const FName OTHER_DIALOGUE_SYSTEM_MENU_CATEGORY_KEY(TEXT("Other Dialogue System")); 10 | static const FText OTHER_DIALOGUE_SYSTEM_MENU_CATEGORY_KEY_TEXT(NSLOCTEXT("OtherDlgSystemEditor", "OtherDlgSystemAssetCategory", "OtherDialogue System")); 11 | 12 | // DlgDataDisplay TabID 13 | static const FName DIALOGUE_DATA_DISPLAY_TAB_ID(TEXT("DlgDataDisplayWindow")); 14 | 15 | // Other Modules constants 16 | static const FName NAME_MODULE_AssetTools(TEXT("AssetTools")); 17 | static const FName NAME_MODULE_AssetRegistry(TEXT("AssetRegistry")); 18 | static const FName NAME_MODULE_LevelEditor(TEXT("LevelEditor")); 19 | static const FName NAME_MODULE_PropertyEditor(TEXT("PropertyEditor")); 20 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgEventCustom.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "DlgObject.h" 4 | 5 | #include "DlgEventCustom.generated.h" 6 | 7 | class UDlgContext; 8 | 9 | // Abstract base class for a custom event 10 | // Extend this class to define additional data you want to store 11 | // 12 | // 1. Override EnterEvent 13 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew) 14 | class DLGSYSTEM_API UDlgEventCustom : public UDlgObject 15 | { 16 | GENERATED_BODY() 17 | public: 18 | // Called when the event is triggered. 19 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue", DisplayName = "Enter") 20 | void EnterEvent(UDlgContext* Context, UObject* Participant); 21 | virtual void EnterEvent_Implementation(UDlgContext* Context, UObject* Participant) {} 22 | 23 | // Display text for editor graph node 24 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue") 25 | FString GetEditorDisplayString(UDlgDialogue* OwnerDialogue, FName ParticipantName); 26 | virtual FString GetEditorDisplayString_Implementation(UDlgDialogue* OwnerDialogue, FName ParticipantName) 27 | { 28 | const FString TargetPreFix = ParticipantName != NAME_None ? FString::Printf(TEXT("[%s] "), *ParticipantName.ToString()) : TEXT(""); 29 | #if WITH_EDITOR 30 | return TargetPreFix + GetClass()->GetDisplayNameText().ToString(); 31 | #else 32 | return TargetPreFix + GetName(); 33 | #endif 34 | } 35 | }; 36 | 37 | // This is the same as UDlgEventCustom but it does NOT show the categories 38 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew, CollapseCategories) 39 | class DLGSYSTEM_API UDlgEventCustomHideCategories : public UDlgEventCustom 40 | { 41 | GENERATED_BODY() 42 | }; 43 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgLocalizationHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #if WITH_EDITOR && USE_STABLE_LOCALIZATION_KEYS 7 | #include "STextPropertyEditableTextBox.h" 8 | #endif// WITH_EDITOR && USE_STABLE_LOCALIZATION_KEYS 9 | 10 | class UDlgSystemSettings; 11 | 12 | /** 13 | * General helper methods 14 | */ 15 | class DLGSYSTEM_API FDlgLocalizationHelper 16 | { 17 | typedef FDlgLocalizationHelper Self; 18 | public: 19 | static void UpdateTextFromRemapping(const UDlgSystemSettings& Settings, FText& OutText); 20 | 21 | #if WITH_EDITOR 22 | // Updates the text namespace to match the settings options 23 | // NOTE: only works in editor mode 24 | static void UpdateTextNamespaceAndKey(const UObject* Object, const UDlgSystemSettings& Settings, FText& Text); 25 | #else 26 | // NO OP 27 | static void UpdateTextNamespaceAndKey(const UObject* Object, const UDlgSystemSettings& Settings, FText& Text) {} 28 | #endif 29 | 30 | // Will we update the text namespace for the following texts 31 | static bool WillTextNamespaceBeUpdated(const FText& Text); 32 | static bool WillTextNamespaceBeUpdated(const FText& Text, const UDlgSystemSettings& Settings); 33 | 34 | #if WITH_EDITOR && USE_STABLE_LOCALIZATION_KEYS 35 | // Copied From IEditableTextProperty 36 | 37 | /** Get the localization ID we should use for the given object, and the given text instance */ 38 | static void StaticStableTextId(const UObject* InObject, IEditableTextProperty::ETextPropertyEditAction InEditAction, const FString& InTextSource, const FString& InProposedNamespace, const FString& InProposedKey, FString& OutStableNamespace, FString& OutStableKey); 39 | 40 | /** Get the localization ID we should use for the given package, and the given text instance */ 41 | static void StaticStableTextId(const UPackage* InPackage, IEditableTextProperty::ETextPropertyEditAction InEditAction, const FString& InTextSource, const FString& InProposedNamespace, const FString& InProposedKey, FString& OutStableNamespace, FString& OutStableKey); 42 | 43 | protected: 44 | // Returns true if we should do an update of the FText 45 | // false otherwise 46 | static bool GetNewNamespaceAndKey( 47 | const UObject* Object, 48 | const UDlgSystemSettings& Settings, 49 | const FText& Text, 50 | FString& OutNewNamespace, 51 | FString& OutNewKey 52 | ); 53 | 54 | #endif // WITH_EDITOR && USE_STABLE_LOCALIZATION_KEYS 55 | 56 | }; 57 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgMemory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgMemory.h" 3 | #include "DlgHelper.h" 4 | 5 | void FDlgHistory::Add(int32 NodeIndex, const FGuid& NodeGUID) 6 | { 7 | if (NodeIndex >= 0) 8 | { 9 | VisitedNodeIndices.Add(NodeIndex); 10 | } 11 | if (NodeGUID.IsValid()) 12 | { 13 | VisitedNodeGUIDs.Add(NodeGUID); 14 | } 15 | } 16 | 17 | bool FDlgHistory::Contains(int32 NodeIndex, const FGuid& NodeGUID) const 18 | { 19 | // Use GUID 20 | if (CanUseGUIDForSearch() && NodeGUID.IsValid()) 21 | { 22 | return VisitedNodeGUIDs.Contains(NodeGUID); 23 | } 24 | 25 | // FallBack to Node Index 26 | return VisitedNodeIndices.Contains(NodeIndex); 27 | } 28 | 29 | bool FDlgHistory::operator==(const FDlgHistory& Other) const 30 | { 31 | return FDlgHelper::IsSetEqual(VisitedNodeIndices, Other.VisitedNodeIndices) 32 | && FDlgHelper::IsSetEqual(VisitedNodeGUIDs, Other.VisitedNodeGUIDs); 33 | } 34 | 35 | FDlgNodeSavedData& FDlgHistory::GetNodeData(const FGuid& NodeGUID) 36 | { 37 | return NodeData.FindOrAdd(NodeGUID); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgNodeData.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "DlgObject.h" 4 | 5 | #include "DlgNodeData.generated.h" 6 | 7 | // Abstract base class for node data 8 | // Defining class via inheriting from UDlgNodeData outside of the plugin is possible both in Blueprint and C++ 9 | // Extend this class to define additional data you want to store on your nodes 10 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew) 11 | class DLGSYSTEM_API UDlgNodeData : public UDlgObject 12 | { 13 | GENERATED_BODY() 14 | }; 15 | 16 | // This is the same as UDlgNodeData but it does NOT show any categories 17 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew, CollapseCategories) 18 | class DLGSYSTEM_API UDlgNodeDataHideCategories : public UDlgNodeData 19 | { 20 | GENERATED_BODY() 21 | }; 22 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgObject.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgObject.h" 3 | 4 | #include "DlgManager.h" 5 | #include "UObject/Object.h" 6 | 7 | void UDlgObject::PostInitProperties() 8 | { 9 | // We must always set the outer to be something that exists at runtime 10 | #if WITH_EDITOR 11 | if (UEdGraphNode* GraphNode = Cast(GetOuter())) 12 | { 13 | UDlgDialogue::GetDialogueEditorAccess()->SetNewOuterForObjectFromGraphNode(this, GraphNode); 14 | } 15 | #endif 16 | 17 | Super::PostInitProperties(); 18 | } 19 | 20 | UWorld* UDlgObject::GetWorld() const 21 | { 22 | if (HasAnyFlags(RF_ArchetypeObject | RF_ClassDefaultObject)) 23 | { 24 | return nullptr; 25 | } 26 | 27 | // Get from outer 28 | if (UObject* Outer = GetOuter()) 29 | { 30 | if (UWorld* World = Outer->GetWorld()) 31 | { 32 | return World; 33 | } 34 | } 35 | 36 | // Last resort 37 | return UDlgManager::GetDialogueWorld(); 38 | } 39 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgObject.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "UObject/Object.h" 4 | 5 | #include "DlgObject.generated.h" 6 | 7 | // Our Dialogue base object 8 | UCLASS(Abstract, ClassGroup = "Dialogue", HideCategories = ("DoNotShow"), AutoExpandCategories = ("Default")) 9 | class DLGSYSTEM_API UDlgObject : public UObject 10 | { 11 | GENERATED_BODY() 12 | public: 13 | // UObject interface 14 | void PostInitProperties() override; 15 | UWorld* GetWorld() const override; 16 | }; 17 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgParticipantName.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "UObject/ObjectMacros.h" 6 | #include "UObject/Interface.h" 7 | 8 | #include "DlgParticipantName.generated.h" 9 | 10 | 11 | // Helper struct to provide a way to reference "Participants" in custom events and conditions 12 | // Custom UI picker is supported to set it, and the DlgContext has a helper function to get the participant from the name 13 | USTRUCT(BlueprintType) 14 | struct DLGSYSTEM_API FDlgParticipantName 15 | { 16 | GENERATED_USTRUCT_BODY() 17 | 18 | public: 19 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialogue") 20 | FName ParticipantName; 21 | }; 22 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgSystem.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | 6 | public class DlgSystem : ModuleRules 7 | { 8 | public DlgSystem(ReadOnlyTargetRules Target) : base(Target) 9 | { 10 | // Enable IWYU 11 | // https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/index.html 12 | // https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/Configuration/ 13 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 14 | 15 | #if UE_5_2_OR_LATER 16 | IWYUSupport = IWYUSupport.Full; 17 | #else 18 | bEnforceIWYU = true; 19 | #endif 20 | 21 | // bUseUnity = false; 22 | 23 | PublicDependencyModuleNames.AddRange( 24 | new string[] { 25 | "Core", 26 | "Json", 27 | "JsonUtilities" 28 | // ... add other public dependencies that you statically link with here ... 29 | }); 30 | 31 | 32 | PrivateDependencyModuleNames.AddRange( 33 | new string[] { 34 | "CoreUObject", 35 | "Engine", 36 | "Projects", // IPluginManager 37 | 38 | // UI 39 | "SlateCore", 40 | "Slate", 41 | "InputCore" 42 | // ... add private dependencies that you statically link with here ... 43 | }); 44 | 45 | // Add MessageLog support 46 | if (Target.bBuildDeveloperTools) 47 | { 48 | PrivateDependencyModuleNames.Add("MessageLog"); 49 | } 50 | 51 | // We need this dependency when the DlgSystem works in the editor mode/built with editor 52 | if (Target.bBuildEditor) 53 | { 54 | PrivateDependencyModuleNames.Add("EditorWidgets"); 55 | PrivateDependencyModuleNames.Add("UnrealEd"); 56 | PrivateDependencyModuleNames.Add("EditorStyle"); 57 | 58 | // Accessing the menu 59 | PrivateDependencyModuleNames.Add("WorkspaceMenuStructure"); 60 | } 61 | 62 | // Add GameplayDebugger functionality if not 'Shipping' or 'Test' Target. 63 | if (Target.bBuildDeveloperTools || 64 | (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test)) 65 | { 66 | PrivateDependencyModuleNames.Add("GameplayDebugger"); 67 | PublicDefinitions.Add("WITH_GAMEPLAY_DEBUGGER=1"); 68 | } 69 | else 70 | { 71 | PublicDefinitions.Add("WITH_GAMEPLAY_DEBUGGER=0"); 72 | } 73 | 74 | #if UE_4_26_OR_LATER 75 | PrivateDependencyModuleNames.Add("DeveloperSettings"); 76 | #endif 77 | 78 | DynamicallyLoadedModuleNames.AddRange( 79 | new string[] { 80 | // ... add any modules that your module loads dynamically here ... 81 | }); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/DlgTextArgumentCustom.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "DlgObject.h" 4 | 5 | #include "DlgTextArgumentCustom.generated.h" 6 | 7 | class UDlgContext; 8 | 9 | 10 | // Abstract base class for a custom text argument 11 | // Extend this class to define additional data you want to store 12 | // 13 | // 1. Override GetText 14 | // 2. Return the new Text for the specified text argument 15 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew) 16 | class DLGSYSTEM_API UDlgTextArgumentCustom : public UDlgObject 17 | { 18 | GENERATED_BODY() 19 | public: 20 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Dialogue") 21 | FText GetText(const UDlgContext* Context, const UObject* Participant, const FString& DisplayStringParam); 22 | virtual FText GetText_Implementation(const UDlgContext* Context, const UObject* Participant, const FString& DisplayStringParam) 23 | { 24 | return FText::GetEmpty(); 25 | } 26 | }; 27 | 28 | // This is the same as UDlgTextArgumentCustom but it does NOT show the categories 29 | UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew, CollapseCategories) 30 | class DLGSYSTEM_API UDlgTextArgumentCustomHideCategories : public UDlgTextArgumentCustom 31 | { 32 | GENERATED_BODY() 33 | }; 34 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/GameplayDebugger/DlgDataDisplayActorProperties.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/TreeViewHelpers/DlgTreeViewParticipantProperties.h" 7 | #include "DlgSystem/TreeViewHelpers/DlgTreeViewVariableProperties.h" 8 | 9 | 10 | /** Used as a key for the variable property */ 11 | class DLGSYSTEM_API FDlgDataDisplayVariableProperties : public FDlgTreeViewVariableProperties 12 | { 13 | typedef FDlgTreeViewVariableProperties Super; 14 | 15 | public: 16 | FDlgDataDisplayVariableProperties(const TSet>& InDialogues) : Super(InDialogues) {} 17 | FDlgDataDisplayVariableProperties(const TSet>&& InDialogues) : Super(InDialogues) {} 18 | }; 19 | 20 | /** Used as a key for the Actor in the fast lookup table. */ 21 | class DLGSYSTEM_API FDlgDataDisplayActorProperties : public FDlgTreeViewParticipantProperties 22 | { 23 | typedef FDlgTreeViewParticipantProperties Super; 24 | 25 | public: 26 | FDlgDataDisplayActorProperties(const TSet>& InDialogues) : Super(InDialogues) {} 27 | FDlgDataDisplayActorProperties(const TSet>&& InDialogues) : Super(InDialogues) {} 28 | }; 29 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/GameplayDebugger/DlgDataDisplayTreeNode.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgDataDisplayTreeNode.h" 3 | 4 | #define LOCTEXT_NAMESPACE "FDlgDataDisplayTreeNode" 5 | 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 7 | // FDlgDataDisplayTreeNode 8 | FDlgDataDisplayTreeNode::FDlgDataDisplayTreeNode(const FText& InDisplayText, const TSharedPtr& InParent) 9 | : Super(InDisplayText, InParent) 10 | { 11 | } 12 | 13 | TWeakObjectPtr FDlgDataDisplayTreeNode::GetParentActor() const 14 | { 15 | if (Parent.IsValid()) 16 | { 17 | return Parent.Pin()->GetParentActor(); 18 | } 19 | 20 | return nullptr; 21 | } 22 | 23 | 24 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 25 | // FDialogueBrowserTreeRootNode 26 | FDlgDataDisplayTreeRootNode::FDlgDataDisplayTreeRootNode() : 27 | Super(FText::FromString(TEXT("ROOT")), nullptr) 28 | { 29 | } 30 | 31 | 32 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 33 | // FDlgDataDisplayTreeActorNode 34 | FDlgDataDisplayTreeActorNode::FDlgDataDisplayTreeActorNode( 35 | const FText& InDisplayText, 36 | const TSharedPtr& InParent, 37 | TWeakObjectPtr InActor 38 | ) : Super(InDisplayText, InParent), Actor(InActor) 39 | { 40 | TextType = EDlgDataDisplayTextTreeNodeType::Actor; 41 | } 42 | 43 | TWeakObjectPtr FDlgDataDisplayTreeActorNode::GetParentActor() const 44 | { 45 | // Get the Actor from this. 46 | if (Actor.IsValid()) 47 | { 48 | return Actor; 49 | } 50 | 51 | return Super::GetParentActor(); 52 | } 53 | 54 | 55 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 56 | // FDlgDataDisplayTreeCategoryNode 57 | FDlgDataDisplayTreeCategoryNode::FDlgDataDisplayTreeCategoryNode( 58 | const FText& InDisplayText, 59 | const TSharedPtr& InParent, 60 | EDlgDataDisplayCategoryTreeNodeType InCategoryType 61 | ) : Super(InDisplayText, InParent) 62 | { 63 | CategoryType = InCategoryType; 64 | } 65 | 66 | 67 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 68 | // FDlgDataDisplayTreeVariableNode 69 | FDlgDataDisplayTreeVariableNode::FDlgDataDisplayTreeVariableNode( 70 | const FText& InDisplayText, 71 | const TSharedPtr& InParent, 72 | FName InVariableName, 73 | EDlgDataDisplayVariableTreeNodeType InVariableType 74 | ) : Super(InDisplayText, InParent), VariableName(InVariableName), VariableType(InVariableType) 75 | { 76 | TextType = EDlgDataDisplayTextTreeNodeType::Variable; 77 | } 78 | 79 | #undef LOCTEXT_NAMESPACE 80 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/GameplayDebugger/DlgGameplayDebuggerCategory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #if WITH_GAMEPLAY_DEBUGGER 3 | #include "DlgGameplayDebuggerCategory.h" 4 | 5 | #include "DlgSystem/DlgManager.h" 6 | 7 | FDlgGameplayDebuggerCategory::FDlgGameplayDebuggerCategory() 8 | { 9 | bShowOnlyWithDebugActor = false; 10 | } 11 | 12 | void FDlgGameplayDebuggerCategory::CollectData(APlayerController* OwnerPC, AActor* DebugActor) 13 | { 14 | Data.NumLoadedDialogues = UDlgManager::GetAllDialoguesFromMemory().Num(); 15 | 16 | if (DebugActor) 17 | { 18 | 19 | } 20 | } 21 | 22 | void FDlgGameplayDebuggerCategory::DrawData(APlayerController* OwnerPC, FGameplayDebuggerCanvasContext& CanvasContext) 23 | { 24 | CanvasContext.Printf(TEXT("{green}Number loaded Dialogues: %s"), *FString::FromInt(Data.NumLoadedDialogues)); 25 | } 26 | 27 | #endif // WITH_GAMEPLAY_DEBUGGER 28 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/GameplayDebugger/DlgGameplayDebuggerCategory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #if WITH_GAMEPLAY_DEBUGGER 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayDebuggerCategory.h" 7 | 8 | class AActor; 9 | class APlayerController; 10 | class FGameplayDebuggerCanvasContext; 11 | 12 | // The data we're going to print inside the viewport 13 | struct DLGSYSTEM_API FDlgDataToPrint 14 | { 15 | int32 NumLoadedDialogues = 0; 16 | }; 17 | 18 | class DLGSYSTEM_API FDlgGameplayDebuggerCategory : public FGameplayDebuggerCategory 19 | { 20 | private: 21 | typedef FDlgGameplayDebuggerCategory Self; 22 | 23 | public: 24 | FDlgGameplayDebuggerCategory(); 25 | 26 | /** Creates an instance of this category - will be used on module startup to include our category in the Editor */ 27 | static TSharedRef MakeInstance() { return MakeShared(); } 28 | 29 | // Begin FGameplayDebuggerCategory Interface 30 | 31 | /** Collects the data we would like to print */ 32 | void CollectData(APlayerController* OwnerPC, AActor* DebugActor) override; 33 | 34 | /** Displays the data we collected in the CollectData function */ 35 | void DrawData(APlayerController* OwnerPC, FGameplayDebuggerCanvasContext& CanvasContext) override; 36 | 37 | protected: 38 | // The data that we're going to print 39 | FDlgDataToPrint Data; 40 | }; 41 | 42 | #endif // WITH_GAMEPLAY_DEBUGGER 43 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/IDlgEditorAccess.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #if WITH_EDITOR 7 | #include "EdGraph/EdGraphNode.h" 8 | 9 | class UEdGraph; 10 | class UDlgDialogue; 11 | class UDlgNode; 12 | 13 | /** 14 | * Interface for dialogue graph interaction with the DlgSystemEditor module. 15 | * See DlgDialogueEditorModule.h (in the DlgSystemEditor) for the implementation of this interface. 16 | */ 17 | class DLGSYSTEM_API IDlgEditorAccess 18 | { 19 | public: 20 | virtual ~IDlgEditorAccess() {} 21 | 22 | // Updates the graph node edges data to match the dialogue data 23 | virtual void UpdateGraphNodeEdges(UEdGraphNode* GraphNode) = 0; 24 | 25 | // Creates a new dialogue graph. 26 | virtual UEdGraph* CreateNewDialogueGraph(UDlgDialogue* Dialogue) const = 0; 27 | 28 | // Compiles the dialogue nodes from the graph nodes. Meaning it transforms the graph data -> (into) dialogue data. 29 | virtual void CompileDialogueNodesFromGraphNodes(UDlgDialogue* Dialogue) const = 0; 30 | 31 | // Removes all nodes from the graph. 32 | virtual void RemoveAllGraphNodes(UDlgDialogue* Dialogue) const = 0; 33 | 34 | // Tells us if the number of dialogue nodes matches with the number of graph nodes (corresponding to dialogues). 35 | virtual bool AreDialogueNodesInSyncWithGraphNodes(UDlgDialogue* Dialogue) const = 0; 36 | 37 | // Updates the Dialogue to match the version UseOnlyOneOutputAndInputPin 38 | virtual void UpdateDialogueToVersion_UseOnlyOneOutputAndInputPin(UDlgDialogue* Dialogue) const = 0; 39 | 40 | // Tries to set the new outer for Object to the closes UDlgNode from UEdGraphNode 41 | virtual void SetNewOuterForObjectFromGraphNode(UObject* Object, UEdGraphNode* GraphNode) const = 0; 42 | }; 43 | #endif // WITH_EDITOR 44 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/IDlgSystemModule.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Modules/ModuleManager.h" 5 | #include "Modules/ModuleInterface.h" 6 | 7 | // The name of the Dialogue System plugin as defined in the .uplugin file 8 | const FName DIALOGUE_SYSTEM_PLUGIN_NAME(TEXT("DlgSystem")); 9 | 10 | class AActor; 11 | class SWidget; 12 | class SDockTab; 13 | struct FTabSpawnerEntry; 14 | 15 | /** 16 | * Interface for the DlgSystem module. 17 | */ 18 | class DLGSYSTEM_API IDlgSystemModule : public IModuleInterface 19 | { 20 | public: 21 | 22 | /** 23 | * Singleton-like access to this module's interface. This is just for convenience! 24 | * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. 25 | * 26 | * @return Returns singleton instance, loading the module on demand if needed 27 | */ 28 | static IDlgSystemModule& Get() 29 | { 30 | return FModuleManager::LoadModuleChecked(DIALOGUE_SYSTEM_PLUGIN_NAME); 31 | } 32 | 33 | /** 34 | * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. 35 | * 36 | * @return True if the module is loaded and ready to use 37 | */ 38 | static bool IsAvailable() 39 | { 40 | return FModuleManager::Get().IsModuleLoaded(DIALOGUE_SYSTEM_PLUGIN_NAME); 41 | } 42 | 43 | public: 44 | virtual ~IDlgSystemModule() {} 45 | 46 | /** 47 | * Registers all the console commands. 48 | * @param WorldConextObjectPtr - The reference actor for the World. Without this the runtime module won't know how to get the UWorld. 49 | */ 50 | virtual void RegisterConsoleCommands(const TWeakObjectPtr& WorldContextObjectPtr) = 0; 51 | 52 | // Unregister all the console commands 53 | virtual void UnregisterConsoleCommands() = 0; 54 | 55 | // Gets the debug Dialogue Data Display Window. 56 | virtual TSharedRef GetDialogueDataDisplayWindow() = 0; 57 | 58 | // Gets the tab entry for the Window 59 | virtual FTabSpawnerEntry* GetDialogueDataDisplaySpawnEntry() = 0; 60 | 61 | // Display the debug Dialogue Data Window on the screen 62 | virtual void DisplayDialogueDataWindow() = 0; 63 | }; 64 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/IO/IDlgParser.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "UObject/UObjectIterator.h" 5 | #include "Containers/Array.h" 6 | #include "UObject/Object.h" 7 | 8 | class DLGSYSTEM_API IDlgParser 9 | { 10 | public: 11 | virtual ~IDlgParser() {} 12 | 13 | /** Initializes the parser with the specified FilePath. */ 14 | virtual void InitializeParser(const FString& FilePath) = 0; 15 | 16 | /** Initializes the parser with the specified input string */ 17 | virtual void InitializeParserFromString(const FString& Text) {}; 18 | 19 | /** Is the parsed file valid? */ 20 | virtual bool IsValidFile() const = 0; 21 | 22 | /** 23 | * Reads all property from the config file. 24 | * 25 | * @param ReferenceClass: UStruct (or UClass) of the TargetObject 26 | * @param TargetObject: pointer to the object instance the function will modify based on the config values 27 | * @param DefaultObjectOuter: Outer used for UObject construction if necessary 28 | */ 29 | virtual void ReadAllProperty(const UStruct* ReferenceClass, void* TargetObject, UObject* DefaultObjectOuter = nullptr) = 0; 30 | 31 | // bLogVerbose: 32 | bool IsLogVerbose() const { return bLogVerbose; } 33 | void SetLogVerbose(bool bValue) { bLogVerbose = bValue; } 34 | 35 | protected: 36 | /** 37 | * Searches the proper not abstract class 38 | * 39 | * @param ParentClass: the class we are looking for has to inherit from this class 40 | * @param Name: the name of the class we are looking for (without engine pretags, e.g. Actor for AActor) 41 | * 42 | * @return the class, or nullptr if it does not exist 43 | */ 44 | const UClass* GetChildClassFromName(const UClass* ParentClass, const FString& Name) 45 | { 46 | for (UClass* Class : StructCache) 47 | { 48 | if (Class->IsChildOf(ParentClass) && Class->GetName() == Name) 49 | { 50 | return Class; 51 | } 52 | } 53 | 54 | for (TObjectIterator It; It; ++It) 55 | { 56 | if (It->IsChildOf(ParentClass) && !It->HasAnyClassFlags(CLASS_Abstract) && (*It)->GetName() == Name) 57 | { 58 | StructCache.Add(*It); 59 | return *It; 60 | } 61 | } 62 | 63 | return nullptr; 64 | } 65 | 66 | /** 67 | * Default way to create new objects 68 | */ 69 | static UObject* CreateNewUObject(const UClass* StructDefinition, UObject* ObjectOuter) 70 | { 71 | return NewObject(!IsValid(ObjectOuter) ? (UObject*)GetTransientPackage() : ObjectOuter, 72 | const_cast(StructDefinition), NAME_None, RF_Transactional); 73 | } 74 | 75 | protected: 76 | /** each time a class is read it also cached here, so next time when it has to be found based on name it can be found faster */ 77 | TArray StructCache; 78 | 79 | // Should this class verbose log? 80 | bool bLogVerbose = false; 81 | }; 82 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Logging/DlgLogger.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgLogger.h" 3 | #include "DlgSystem/DlgSystemModule.h" 4 | #include "DlgSystem/DlgSystemSettings.h" 5 | 6 | #define LOCTEXT_NAMESPACE "DlgLogger" 7 | 8 | static const FName MESSAGE_LOG_NAME{TEXT("Dialogue Plugin")}; 9 | 10 | FDlgLogger::FDlgLogger() : Super() 11 | { 12 | static constexpr bool bOwnMessageLogMirrorToOutputLog = true; 13 | EnableMessageLog(bOwnMessageLogMirrorToOutputLog); 14 | SetMessageLogMirrorToOutputLog(true); 15 | 16 | DisableOutputLog(); 17 | DisableOnScreen(); 18 | DisableClientConsole(); 19 | 20 | // We mirror everything to the output log so that is why we disabled the output log above 21 | SetOutputLogCategory(LogDlgSystem); 22 | SetMessageLogName(MESSAGE_LOG_NAME, false); 23 | SetMessageLogOpenOnNewMessage(true); 24 | SetRedirectMessageLogLevelsHigherThan(ENYLoggerLogLevel::Warning); 25 | SetOpenMessageLogLevelsHigherThan(ENYLoggerLogLevel::NoLogging); 26 | } 27 | 28 | FDlgLogger& FDlgLogger::SyncWithSettings() 29 | { 30 | const UDlgSystemSettings* Settings = GetDefault(); 31 | 32 | UseMessageLog(Settings->bEnableMessageLog); 33 | SetMessageLogMirrorToOutputLog(Settings->bMessageLogMirrorToOutputLog); 34 | UseOutputLog(Settings->bEnableOutputLog); 35 | SetRedirectMessageLogLevelsHigherThan(Settings->RedirectMessageLogLevelsHigherThan); 36 | SetOpenMessageLogLevelsHigherThan(Settings->OpenMessageLogLevelsHigherThan); 37 | SetMessageLogOpenOnNewMessage(Settings->bMessageLogOpen); 38 | 39 | return *this; 40 | } 41 | 42 | void FDlgLogger::OnStart() 43 | { 44 | MessageLogRegisterLogName(MESSAGE_LOG_NAME, LOCTEXT("dlg_key", "Dialogue System Plugin")); 45 | Get().SyncWithSettings(); 46 | } 47 | 48 | void FDlgLogger::OnShutdown() 49 | { 50 | MessageLogUnregisterLogName(MESSAGE_LOG_NAME); 51 | } 52 | 53 | #undef LOCTEXT_NAMESPACE 54 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Logging/DlgLogger.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "INYLogger.h" 6 | 7 | 8 | class DLGSYSTEM_API FDlgLogger : public INYLogger 9 | { 10 | typedef FDlgLogger Self; 11 | typedef INYLogger Super; 12 | 13 | protected: 14 | FDlgLogger(); 15 | 16 | public: 17 | virtual ~FDlgLogger() {} 18 | 19 | // Sync values with system UDlgSystemSettings values 20 | Self& SyncWithSettings(); 21 | 22 | // Create a new logger 23 | static FDlgLogger New() { return Self{}; } 24 | static FDlgLogger& Get() 25 | { 26 | static FDlgLogger Instance; 27 | return Instance; 28 | } 29 | 30 | static void OnStart(); 31 | static void OnShutdown(); 32 | }; 33 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/NYEngineVersionHelpers.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "Templates/Casts.h" 6 | #include "Runtime/Launch/Resources/Version.h" 7 | 8 | #define NY_ENGINE_VERSION (ENGINE_MAJOR_VERSION * 100 + ENGINE_MINOR_VERSION) 9 | 10 | #if NY_ENGINE_VERSION < 425 11 | // Mimic 4.25 Reflection system changes 12 | using FFieldClass = UClass; 13 | using FProperty = UProperty; 14 | 15 | using FNumericProperty = UNumericProperty; 16 | using FByteProperty = UByteProperty; 17 | using FIntProperty = UIntProperty; 18 | using FInt64Property = UInt64Property; 19 | 20 | using FFloatProperty = UFloatProperty; 21 | using FDoubleProperty = UDoubleProperty; 22 | using FBoolProperty = UBoolProperty; 23 | 24 | using FObjectPropertyBase = UObjectPropertyBase; 25 | using FObjectProperty = UObjectProperty; 26 | using FWeakObjectProperty = UWeakObjectProperty; 27 | using FLazyObjectProperty = ULazyObjectProperty; 28 | using FSoftObjectProperty = USoftObjectProperty; 29 | using FClassProperty = UClassProperty; 30 | using FSoftClassProperty = USoftClassProperty; 31 | using FInterfaceProperty = UInterfaceProperty; 32 | 33 | using FNameProperty = UNameProperty; 34 | using FStrProperty = UStrProperty; 35 | using FTextProperty = UTextProperty; 36 | 37 | using FArrayProperty = UArrayProperty; 38 | using FMapProperty = UMapProperty; 39 | using FSetProperty = USetProperty; 40 | 41 | using FStructProperty = UStructProperty; 42 | // using FMulticastDelegateProperty FNYMulticastDelegateProperty; 43 | // using FMulticastInlineDelegateProperty FNYMulticastInlineDelegateProperty; 44 | // using FMulticastSparseDelegateProperty FNYMulticastSparseDelegateProperty; 45 | using FEnumProperty = UEnumProperty; 46 | #endif // NY_ENGINE_VERSION < 425 47 | 48 | #if NY_ENGINE_VERSION >= 424 49 | #define NY_ARRAY_COUNT UE_ARRAY_COUNT 50 | #else 51 | #define NY_ARRAY_COUNT ARRAY_COUNT 52 | #endif 53 | 54 | #if WITH_EDITOR 55 | #if NY_ENGINE_VERSION >= 501 56 | #include "Styling/AppStyle.h" 57 | using FNYAppStyle = FAppStyle; 58 | #define NY_GET_APP_STYLE_NAME() FNYAppStyle::GetAppStyleSetName() 59 | #else 60 | #include "EditorStyleSet.h" 61 | using FNYAppStyle = FEditorStyle; 62 | #define NY_GET_APP_STYLE_NAME() FNYAppStyle::GetStyleSetName() 63 | #endif // NY_ENGINE_VERSION >= 501 64 | #endif // WITH_EDITOR 65 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_Custom.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/Nodes/DlgNode.h" 7 | 8 | #include "DlgNode_Custom.generated.h" 9 | 10 | 11 | /** 12 | * Abstract dialogue node, can be extended outside of the plugin to add custom data and implement custom behavior 13 | */ 14 | UCLASS(BlueprintType, Abstract, ClassGroup = "Dialogue") 15 | class DLGSYSTEM_API UDlgNode_Custom : public UDlgNode 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | 21 | // 22 | // Check the virtual functions in UDlgNode to see what you need to override 23 | // in your own childclass to implement custom runtime behavior 24 | // 25 | 26 | 27 | public: 28 | 29 | // 30 | // Editor customization 31 | // 32 | 33 | /** @return a one line description of an object. */ 34 | virtual FString GetDesc() override { return TEXT("My Custom Desc"); } 35 | 36 | 37 | #if WITH_EDITOR 38 | // Name of the node in the add node context menu 39 | virtual FString GetNodeTypeString() const override { return TEXT("My custom Node"); } 40 | 41 | /** Node parameter category name in details panel */ 42 | virtual FName GetCategoryName() const { return TEXT("Custom"); } 43 | 44 | /** override and return true to not have a warning on the node if it is orphan without targeted by a proxy */ 45 | virtual bool CanBeOrphan() const { return false; } 46 | 47 | virtual FLinearColor GetNodeColor() const { return FLinearColor::Gray; } 48 | 49 | /** Override and return to false if the node should not be able to have parents (like UDlgNode_Start) */ 50 | virtual bool CanHaveInputConnections() const { return true; } 51 | 52 | /** Override and return to false if the node should not be able to have children (like UDlgNode_Proxy) */ 53 | virtual bool CanHaveOutputConnections() const { return true; } 54 | 55 | /** Option to override the node title (to have a custom one instead of the node owner). Return true if you want to use OutTitle */ 56 | virtual bool GetNodeTitleOverride(FString& OutTitle) const { return false; } 57 | #endif 58 | }; 59 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_End.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNode_End.h" 3 | 4 | FString UDlgNode_End::GetDesc() 5 | { 6 | return TEXT("Node ending the Dialogue.\nDoes not have text, if it is entered the Dialogue is over.\nEvents and enter conditions are taken into account."); 7 | } 8 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_End.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/Nodes/DlgNode.h" 7 | 8 | #include "DlgNode_End.generated.h" 9 | 10 | 11 | /** 12 | * Node ending the Dialogue. 13 | * Does not have text, if it is entered the Dialogue is over. 14 | * Events and enter conditions are taken into account. 15 | */ 16 | UCLASS(BlueprintType, ClassGroup = "Dialogue") 17 | class DLGSYSTEM_API UDlgNode_End : public UDlgNode 18 | { 19 | GENERATED_BODY() 20 | 21 | public: 22 | // Begin UObject Interface. 23 | 24 | /** @return a one line description of an object. */ 25 | FString GetDesc() override; 26 | 27 | // Begin UDlgNode Interface. 28 | bool ReevaluateChildren(UDlgContext& Context, TSet AlreadyEvaluated) override { return false; } 29 | bool OptionSelected(int32 OptionIndex, bool bFromAll, UDlgContext& Context) override { return false; } 30 | 31 | #if WITH_EDITOR 32 | FString GetNodeTypeString() const override { return TEXT("End"); } 33 | #endif 34 | }; 35 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_Proxy.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNode_Proxy.h" 3 | 4 | #include "DlgSystem/DlgContext.h" 5 | #include "DlgSystem/Logging/DlgLogger.h" 6 | 7 | bool UDlgNode_Proxy::HandleNodeEnter(UDlgContext& Context, TSet NodesEnteredWithThisStep) 8 | { 9 | FireNodeEnterEvents(Context); 10 | 11 | if (NodesEnteredWithThisStep.Contains(this)) 12 | { 13 | FDlgLogger::Get().Errorf( 14 | TEXT("ProxyNode::HandleNodeEnter - Failed to enter proxy node, it was entered multiple times in a single step." 15 | "Theoretically with some condition magic it could make sense, but chances are that it is an endless loop," 16 | "thus entering the same proxy twice with a single step is not supported. Dialogue is terminated.\nContext:\n\t%s"), 17 | *Context.GetContextString() 18 | ); 19 | 20 | return false; 21 | } 22 | NodesEnteredWithThisStep.Add(this); 23 | 24 | return Context.EnterNode(NodeIndex, NodesEnteredWithThisStep); 25 | } 26 | 27 | bool UDlgNode_Proxy::CheckNodeEnterConditions(const UDlgContext& Context, TSet AlreadyVisitedNodes) const 28 | { 29 | if (!Super::CheckNodeEnterConditions(Context, AlreadyVisitedNodes)) 30 | { 31 | return false; 32 | } 33 | 34 | const UDlgNode* Node = Context.GetNodeFromIndex(NodeIndex); 35 | check(Node); 36 | return Node->CheckNodeEnterConditions(Context, AlreadyVisitedNodes); 37 | } 38 | 39 | void UDlgNode_Proxy::RemapOldIndicesWithNew(const TMap& OldToNewIndexMap) 40 | { 41 | if (const int32* NewIndexPtr = OldToNewIndexMap.Find(NodeIndex)) 42 | { 43 | NodeIndex = *NewIndexPtr; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_Proxy.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "CoreMinimal.h" 4 | 5 | #include "DlgSystem/Nodes/DlgNode.h" 6 | 7 | #include "DlgNode_Proxy.generated.h" 8 | 9 | 10 | 11 | /** 12 | * Node without text. Execution auto-steps through it to the referenced node. 13 | * Can be used to reduce dialogue graph spaghetti. 14 | */ 15 | UCLASS(BlueprintType, ClassGroup = "Dialogue") 16 | class DLGSYSTEM_API UDlgNode_Proxy : public UDlgNode 17 | { 18 | GENERATED_BODY() 19 | 20 | public: 21 | 22 | // @return a one line description of an object. 23 | FString GetDesc() override 24 | { 25 | return TEXT("Jumps execution to the specified target."); 26 | } 27 | 28 | // 29 | // Begin UDlgNode Interface. 30 | // 31 | 32 | bool HandleNodeEnter(UDlgContext& Context, TSet NodesEnteredWithThisStep) override; 33 | virtual bool CheckNodeEnterConditions(const UDlgContext& Context, TSet AlreadyVisitedNodes) const override; 34 | 35 | #if WITH_EDITOR 36 | FString GetNodeTypeString() const override { return TEXT("Proxy"); } 37 | #endif 38 | 39 | // 40 | // Begin own functions 41 | // 42 | 43 | /** Called when dialogue indicies are rebuilt, updates the index so it points to the same node after the change */ 44 | void RemapOldIndicesWithNew(const TMap& OldToNewIndexMap); 45 | 46 | // return with the index of the target in the UDlgDialogue::Nodes array 47 | int32 GetTargetNodeIndex() const { return NodeIndex; } 48 | 49 | 50 | // Helper functions to get the names of some properties. Used by the DlgSystemEditor module. 51 | static FName GetMemberNameNodeIndex() { return GET_MEMBER_NAME_CHECKED(UDlgNode_Proxy, NodeIndex); } 52 | 53 | protected: 54 | 55 | // Index of the node the Proxy represents (in UDlgDialogue::Nodes) 56 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialogue") 57 | int32 NodeIndex = 0; 58 | }; 59 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_Start.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNode_Start.h" 3 | 4 | FString UDlgNode_Start::GetDesc() 5 | { 6 | return TEXT("Possible entry point.\nDoes not have text, the first satisfied child is picked if there is any.\nStart nodes are evaluated from left to right."); 7 | } 8 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Nodes/DlgNode_Start.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/Nodes/DlgNode.h" 7 | 8 | #include "DlgNode_Start.generated.h" 9 | 10 | 11 | /** 12 | * Possible entry point of the Dialogue. 13 | * Does not have text, the first satisfied child is picked if there is any. 14 | * Start nodes are evaluated from left to right. 15 | */ 16 | UCLASS(BlueprintType, ClassGroup = "Dialogue") 17 | class DLGSYSTEM_API UDlgNode_Start : public UDlgNode 18 | { 19 | GENERATED_BODY() 20 | 21 | public: 22 | // Begin UObject Interface. 23 | 24 | /** @return a one line description of an object. */ 25 | FString GetDesc() override; 26 | 27 | #if WITH_EDITOR 28 | FString GetNodeTypeString() const override { return TEXT("Start"); } 29 | #endif 30 | }; 31 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/Tests/DlgTesterHelper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgTesterHelper.h" 3 | 4 | 5 | std::function FDlgTestHelper::Int32ToString = [](const int32& Value) -> FString 6 | { 7 | return FString::FromInt(Value); 8 | }; 9 | 10 | std::function FDlgTestHelper::Int64ToString = [](const int64& Value) -> FString 11 | { 12 | return FString::Printf(TEXT("%lld"), Value); 13 | }; 14 | 15 | 16 | std::function FDlgTestHelper::NameToString = [](const FName& Value) -> FString 17 | { 18 | return Value.ToString(); 19 | }; 20 | 21 | std::function FDlgTestHelper::StringToString = [](const FString& Value) -> FString 22 | { 23 | return Value; 24 | }; 25 | 26 | std::function FDlgTestHelper::FloatToString = [](const float& Value) -> FString 27 | { 28 | return FString::SanitizeFloat(Value); 29 | }; 30 | 31 | std::function FDlgTestHelper::VectorToString = [](const FVector& Value) -> FString 32 | { 33 | return Value.ToString(); 34 | }; 35 | 36 | std::function FDlgTestHelper::ColorToString = [](const FColor& Value) -> FString 37 | { 38 | return Value.ToString(); 39 | }; 40 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/TreeViewHelpers/DlgTreeViewHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "Widgets/Views/STreeView.h" 6 | 7 | #include "DlgSystem/DlgHelper.h" 8 | 9 | class DLGSYSTEM_API FDlgTreeViewHelper 10 | { 11 | public: 12 | static bool PredicateSortDialogueWeakPtrAlphabeticallyAscending( 13 | const TWeakObjectPtr& First, 14 | const TWeakObjectPtr& Second 15 | ) 16 | { 17 | if (!First.IsValid()) 18 | { 19 | return false; 20 | } 21 | if (!Second.IsValid()) 22 | { 23 | return true; 24 | } 25 | 26 | return FDlgHelper::PredicateSortFNameAlphabeticallyAscending(First->GetFName(), Second->GetFName()); 27 | } 28 | 29 | /** Restore the expansion state of the InTree with the ItemSource provided (usually the flattened tree) */ 30 | template 31 | static void RestoreTreeExpansionState( 32 | const TSharedPtr>& InTree, 33 | const TArray& ItemSource, 34 | const TSet& OldExpansionState, ComparisonType ComparisonFunction 35 | ) 36 | { 37 | check(InTree.IsValid()); 38 | 39 | // Iterate over new tree items 40 | for (int32 ItemIdx = 0; ItemIdx < ItemSource.Num(); ItemIdx++) 41 | { 42 | ItemType NewItem = ItemSource[ItemIdx]; 43 | 44 | // Look through old expansion state 45 | for (const ItemType OldItem : OldExpansionState) 46 | { 47 | // See if this matches this new item 48 | if (ComparisonFunction(OldItem, NewItem)) 49 | { 50 | // It does, so expand it 51 | InTree->SetItemExpansion(NewItem, true); 52 | } 53 | } 54 | } 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystem/TreeViewHelpers/DlgTreeViewVariableProperties.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/DlgManager.h" 7 | #include "DlgSystem/TreeViewHelpers/DlgTreeViewHelper.h" 8 | 9 | class UDlgDialogue; 10 | 11 | /** Structure that holds the common properties of a Variable. */ 12 | class DLGSYSTEM_API FDlgTreeViewVariableProperties 13 | { 14 | public: 15 | FDlgTreeViewVariableProperties(const TSet>& InDialogues) : Dialogues(InDialogues) {} 16 | virtual ~FDlgTreeViewVariableProperties() {} 17 | 18 | // Dialogues: 19 | virtual void AddDialogue(TWeakObjectPtr Dialogue) { Dialogues.Add(Dialogue); } 20 | const TSet>& GetDialogues() const { return Dialogues; } 21 | 22 | /** Sorts all the properties it can */ 23 | virtual void Sort() 24 | { 25 | Dialogues.Sort(FDlgTreeViewHelper::PredicateSortDialogueWeakPtrAlphabeticallyAscending); 26 | } 27 | 28 | protected: 29 | /** Dialogues that contain this variable property */ 30 | TSet> Dialogues; 31 | }; 32 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/AssetTypeActions/DlgDialogueAssetTypeActions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgDialogueAssetTypeActions.h" 3 | 4 | #include "DlgSystemEditor/Editor/DlgEditor.h" 5 | #include "DlgSystemEditor/DlgSystemEditorModule.h" 6 | 7 | void FDlgDialogueAssetTypeActions::GetActions(const TArray& InObjects, FMenuBuilder& MenuBuilder) 8 | { 9 | // Implement the menu actions here 10 | } 11 | 12 | void FDlgDialogueAssetTypeActions::OpenAssetEditor(const TArray& InObjects, 13 | TSharedPtr EditWithinLevelEditor) 14 | { 15 | const EToolkitMode::Type Mode = EditWithinLevelEditor.IsValid() ? EToolkitMode::WorldCentric : EToolkitMode::Standalone; 16 | 17 | for (UObject* Object : InObjects) 18 | { 19 | // Only handle dialogues 20 | if (UDlgDialogue* Dialogue = Cast(Object)) 21 | { 22 | UE_LOG(LogDlgSystemEditor, Log, TEXT("Clicked a Dialogue = `%s`"), *Dialogue->GetPathName()); 23 | 24 | TSharedRef NewDialogueEditor(new FDlgEditor()); 25 | NewDialogueEditor->InitDialogueEditor(Mode, EditWithinLevelEditor, Dialogue); 26 | 27 | // Default Editor 28 | // FSimpleAssetEditor::CreateEditor(EToolkitMode::Standalone, EditWithinLevelEditor, Dialogue); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/AssetTypeActions/DlgDialogueAssetTypeActions.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "AssetTypeActions_Base.h" 5 | 6 | #include "DlgSystem/DlgDialogue.h" 7 | 8 | class IToolkitHost; 9 | 10 | /** 11 | * Defines the look and actions the editor takes when clicking/viewing a Dialogue asset. 12 | * See FDlgSystemEditorModule::StartupModule for usage. 13 | */ 14 | class FDlgDialogueAssetTypeActions : public FAssetTypeActions_Base 15 | { 16 | public: 17 | FDlgDialogueAssetTypeActions(EAssetTypeCategories::Type InAssetCategory) : AssetCategory(InAssetCategory) {} 18 | 19 | // 20 | // IAssetTypeActions interface 21 | // 22 | 23 | /** Returns the name of this type */ 24 | FText GetName() const override { return NSLOCTEXT("AssetTypeActions", "DlgDialogueAssetTypeActions", "Dialogue"); } 25 | 26 | /** Returns the color associated with this type */ 27 | FColor GetTypeColor() const override { return FColor::Yellow; } 28 | 29 | /** Checks to see if the specified object is handled by this type. */ 30 | UClass* GetSupportedClass() const override { return UDlgDialogue::StaticClass(); } 31 | 32 | // if the menu has actions from another asset, like create dialogue from this text file or idk 33 | /** Returns true if this class can supply actions for InObjects. */ 34 | bool HasActions(const TArray& InObjects) const override { return false; } 35 | 36 | /** Generates a menubuilder for the specified objects. */ 37 | void GetActions(const TArray& InObjects, FMenuBuilder& MenuBuilder) override; 38 | 39 | /** Opens the asset editor for the specified objects. If EditWithinLevelEditor is valid, the world-centric editor will be used. */ 40 | void OpenAssetEditor(const TArray& InObjects, TSharedPtr EditWithinLevelEditor = TSharedPtr()) override; 41 | 42 | /** Returns the categories that this asset type. The return value is one or more flags from EAssetTypeCategories. */ 43 | uint32 GetCategories() override { return AssetCategory; } 44 | 45 | // Hide from filtered, we use our custom FFrontendFilter_Dialogue because it allows us more flexibility 46 | bool CanFilter() override { return true; } 47 | 48 | private: 49 | /** Indicates the category used for Dialogues */ 50 | EAssetTypeCategories::Type AssetCategory; 51 | }; 52 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/AssetTypeActions/DlgParticipantsAssetTypeActions.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "AssetTypeActions_Base.h" 5 | 6 | class IToolkitHost; 7 | 8 | /** 9 | * See FDlgSystemEditorModule::StartupModule for usage. 10 | * Search for all objects 11 | */ 12 | // class FAssetTypeActions_DlgParticipants : public FAssetTypeActions_Base 13 | // { 14 | // public: 15 | // // 16 | // // IAssetTypeActions interface 17 | // // 18 | // FAssetTypeActions_DlgParticipants(EAssetTypeCategories::Type InAssetCategory) : AssetCategory(InAssetCategory) {} 19 | // 20 | // FText GetName() const override { return NSLOCTEXT("AssetTypeActions", "DlgParticipantAssetTypeActions", "Dialogue Participant"); } 21 | // UClass* GetSupportedClass() const override { return UObject::StaticClass(); } 22 | // FColor GetTypeColor() const override { return FColor(232, 232, 0); } 23 | // bool HasActions(const TArray& InObjects) const override { return false; } 24 | // uint32 GetCategories() override { return EAssetTypeCategories::Blueprint; } 25 | // bool CanFilter() override { return true; } 26 | // void BuildBackendFilter(FARFilter& InFilter) override 27 | // { 28 | // // ImplementedInterfaces is an array of structs (FBPInterfaceDescription). When exported to an AR tag value, each entry will be formatted as: 29 | // // 30 | // // Entry := (Interface=Type'Package.Class') 31 | // // The full tag value (array of exported struct values) will then be formatted as follows: 32 | // // 33 | // // Value := (Entry1,Entry2,...EntryN) 34 | // const FString Value = FString::Printf( 35 | // TEXT("%s"), 36 | // *UDlgDialogueParticipant::StaticClass()->GetPathName() 37 | // ); 38 | // //ImplementedInterfaces=/Script/DlgSystem.DlgDialogueParticipant 39 | // //ImplementedInterfaces=/Script/DlgSystem.DlgDialogueParticipant 40 | // InFilter.TagsAndValues.Add(FBlueprintTags::ImplementedInterfaces, Value); 41 | // 42 | // FBPInterfaceDescription Interface; 43 | // 44 | // InFilter.ClassNames.Add(GetSupportedClass()->GetFName()); 45 | // InFilter.bRecursiveClasses = true; 46 | // } 47 | // 48 | // protected: 49 | // EAssetTypeCategories::Type AssetCategory; 50 | // }; 51 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/DialogueK2Node_Redirects.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DialogueK2Node_Select.h" 5 | #include "DialogueK2Node_SwitchDialogueCallback.h" 6 | #include "DialogueK2Node_SwitchDialogueCallbackVariants.h" 7 | 8 | #include "DialogueK2Node_Redirects.generated.h" 9 | 10 | // Make the node not appear in the menus 11 | // So that the user creates only new nodes, instead of old 12 | #define MAKE_NODE_FITERED_OUT() bool IsActionFilteredOut(FBlueprintActionFilter const& Filter) override { return true; } 13 | 14 | // Selects 15 | UCLASS() 16 | class UDlgK2Node_Select : public UDialogueK2Node_Select 17 | { 18 | GENERATED_BODY() 19 | MAKE_NODE_FITERED_OUT() 20 | }; 21 | 22 | UCLASS() 23 | class UDlgK2Node_SelectFloat : public UDialogueK2Node_SelectFloat 24 | { 25 | GENERATED_BODY() 26 | MAKE_NODE_FITERED_OUT() 27 | }; 28 | 29 | // Switches 30 | UCLASS() 31 | class UDlgK2Node_SwitchDialogueCallback : public UDialogueK2Node_SwitchDialogueCallback 32 | { 33 | GENERATED_BODY() 34 | MAKE_NODE_FITERED_OUT() 35 | }; 36 | 37 | UCLASS() 38 | class UDlgK2Node_SwitchDialogueCallbackEvent : public UDialogueK2Node_SwitchDialogueCallbackEvent 39 | { 40 | GENERATED_BODY() 41 | MAKE_NODE_FITERED_OUT() 42 | }; 43 | 44 | UCLASS() 45 | class UDlgK2Node_SwitchDialogueCallbackCondition : public UDialogueK2Node_SwitchDialogueCallbackCondition 46 | { 47 | GENERATED_BODY() 48 | MAKE_NODE_FITERED_OUT() 49 | }; 50 | 51 | UCLASS() 52 | class UDlgK2Node_SwitchDialogueCallbackFloatValue : public UDialogueK2Node_SwitchDialogueCallbackFloatValue 53 | { 54 | GENERATED_BODY() 55 | MAKE_NODE_FITERED_OUT() 56 | }; 57 | 58 | UCLASS() 59 | class UDlgK2Node_SwitchDialogueCallbackIntValue : public UDialogueK2Node_SwitchDialogueCallbackIntValue 60 | { 61 | GENERATED_BODY() 62 | MAKE_NODE_FITERED_OUT() 63 | }; 64 | 65 | UCLASS() 66 | class UDlgK2Node_SwitchDialogueCallbackBoolValue : public UDialogueK2Node_SwitchDialogueCallbackBoolValue 67 | { 68 | GENERATED_BODY() 69 | MAKE_NODE_FITERED_OUT() 70 | }; 71 | 72 | #undef MAKE_NODE_FITERED_OUT 73 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/DialogueK2Node_SwitchDialogueCallback.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "K2Node_Switch.h" 5 | 6 | #include "DialogueK2Node_SwitchDialogueCallback.generated.h" 7 | 8 | 9 | UENUM() 10 | enum class EDlgDialogueCallback : uint8 11 | { 12 | /** Normal dialogue event during the conversation */ 13 | Event UMETA(DisplayName = "Dialogue Event"), 14 | /** Function call to check a condition */ 15 | Condition UMETA(DisplayName = "Dialogue Condition"), 16 | 17 | FloatValue UMETA(DisplayName = "Condition asking for a float value"), 18 | 19 | IntValue UMETA(DisplayName = "Condition asking for an int value"), 20 | 21 | BoolValue UMETA(DisplayName = "Condition asking for a bool value"), 22 | 23 | NameValue UMETA(DisplayName = "Condition asking for a name value"), 24 | }; 25 | 26 | /** 27 | * 28 | */ 29 | UCLASS() 30 | class UDialogueK2Node_SwitchDialogueCallback : public UK2Node_Switch 31 | { 32 | GENERATED_BODY() 33 | 34 | public: 35 | UDialogueK2Node_SwitchDialogueCallback(const FObjectInitializer& ObjectInitializer); 36 | 37 | // UEdGraphNode interface 38 | void AllocateDefaultPins() override; 39 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 40 | FText GetTooltipText() const override; 41 | // End of UEdGraphNode interface 42 | 43 | // UK2Node interface 44 | void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override; 45 | FText GetMenuCategory() const override; 46 | bool ShouldShowNodeProperties() const override { return true; } 47 | // End of UK2Node interface 48 | 49 | // UK2Node_Switch Interface 50 | void AddPinToSwitchNode() override; 51 | FName GetUniquePinName() override; 52 | FName GetPinNameGivenIndex(int32 Index) const override; 53 | FEdGraphPinType GetPinType() const override; 54 | void RemovePinFromSwitchNode(UEdGraphPin* TargetPin) override; 55 | bool CanRemoveExecutionPin(UEdGraphPin* TargetPin) const override; 56 | // End of UK2Node_Switch Interface 57 | 58 | protected: 59 | // UK2Node_Switch Interface 60 | void CreateCasePins() override; 61 | void CreateSelectionPin() override; 62 | void CreateFunctionPin() override; 63 | void RemovePin(UEdGraphPin* TargetPin) override {} 64 | // End of UK2Node_Switch Interface 65 | 66 | // Begin own functions 67 | // updates DialoguePinNames, return value is true if it is changed 68 | bool RefreshPinNames(); 69 | 70 | protected: 71 | UPROPERTY() 72 | TArray DialoguePinNames; 73 | 74 | UPROPERTY() 75 | EDlgDialogueCallback CallbackType; 76 | }; 77 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/DialogueK2Node_SwitchDialogueCallbackVariants.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DialogueK2Node_SwitchDialogueCallback.h" 5 | 6 | #include "DialogueK2Node_SwitchDialogueCallbackVariants.generated.h" 7 | 8 | /** 9 | * Subclasses for quicker access in blueprint 10 | * They just set and hide the type enum property of the parent 11 | */ 12 | 13 | UCLASS() 14 | class UDialogueK2Node_SwitchDialogueCallbackEvent : public UDialogueK2Node_SwitchDialogueCallback 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UDialogueK2Node_SwitchDialogueCallbackEvent(const FObjectInitializer& ObjectInitializer); 20 | 21 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 22 | FText GetTooltipText() const override; 23 | }; 24 | 25 | UCLASS() 26 | class UDialogueK2Node_SwitchDialogueCallbackCondition : public UDialogueK2Node_SwitchDialogueCallback 27 | { 28 | GENERATED_BODY() 29 | 30 | public: 31 | UDialogueK2Node_SwitchDialogueCallbackCondition(const FObjectInitializer& ObjectInitializer); 32 | 33 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 34 | FText GetTooltipText() const override; 35 | }; 36 | 37 | UCLASS() 38 | class UDialogueK2Node_SwitchDialogueCallbackFloatValue : public UDialogueK2Node_SwitchDialogueCallback 39 | { 40 | GENERATED_BODY() 41 | 42 | public: 43 | UDialogueK2Node_SwitchDialogueCallbackFloatValue(const FObjectInitializer& ObjectInitializer); 44 | 45 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 46 | FText GetTooltipText() const override; 47 | }; 48 | 49 | UCLASS() 50 | class UDialogueK2Node_SwitchDialogueCallbackIntValue : public UDialogueK2Node_SwitchDialogueCallback 51 | { 52 | GENERATED_BODY() 53 | 54 | public: 55 | UDialogueK2Node_SwitchDialogueCallbackIntValue(const FObjectInitializer& ObjectInitializer); 56 | 57 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 58 | FText GetTooltipText() const override; 59 | }; 60 | 61 | UCLASS() 62 | class UDialogueK2Node_SwitchDialogueCallbackBoolValue : public UDialogueK2Node_SwitchDialogueCallback 63 | { 64 | GENERATED_BODY() 65 | 66 | public: 67 | UDialogueK2Node_SwitchDialogueCallbackBoolValue(const FObjectInitializer& ObjectInitializer); 68 | 69 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 70 | FText GetTooltipText() const override; 71 | }; 72 | 73 | UCLASS() 74 | class UDialogueK2Node_SwitchDialogueCallbackNameValue : public UDialogueK2Node_SwitchDialogueCallback 75 | { 76 | GENERATED_BODY() 77 | 78 | public: 79 | UDialogueK2Node_SwitchDialogueCallbackNameValue(const FObjectInitializer& ObjectInitializer); 80 | 81 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 82 | FText GetTooltipText() const override; 83 | }; 84 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/DlgBlueprintUtilities.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "Kismet2/BlueprintEditorUtils.h" 6 | 7 | #include "DlgSystem/DlgDialogueParticipant.h" 8 | #include "DlgSystem/DlgManager.h" 9 | 10 | class FDlgBlueprintUtilities 11 | { 12 | public: 13 | // Gets the blueprint for the provided Node 14 | static UBlueprint* GetBlueprintForGraphNode(const UK2Node* Node) 15 | { 16 | if (!IsValid(Node)) 17 | { 18 | return nullptr; 19 | } 20 | 21 | // NOTE we can't call Node->GetBlueprint() because this is called in strange places ;) 22 | if (const UEdGraph* Graph = Cast(Node->GetOuter())) 23 | { 24 | return FBlueprintEditorUtils::FindBlueprintForGraph(Graph); 25 | } 26 | 27 | return nullptr; 28 | } 29 | 30 | // Checks if the Blueprint for the Node is loaded or not. 31 | static bool IsBlueprintLoadedForGraphNode(const UK2Node* Node) 32 | { 33 | return IsBlueprintLoaded(GetBlueprintForGraphNode(Node)); 34 | } 35 | static bool IsBlueprintLoaded(const UBlueprint* Blueprint) 36 | { 37 | return Blueprint ? !Blueprint->HasAnyFlags(RF_NeedLoad | RF_NeedPostLoad) : false; 38 | } 39 | 40 | /** 41 | * Tries to get the dialogue name... it expects the owner of the node to implement IDlgDialogueParticipant interface 42 | * @return the participant name on success or NAME_None on failure. 43 | */ 44 | static FName GetParticipantNameFromNode(const UK2Node* Node, bool bBlueprintMustBeLoaded) 45 | { 46 | if (const UBlueprint* Blueprint = GetBlueprintForGraphNode(Node)) 47 | { 48 | if (bBlueprintMustBeLoaded && !IsBlueprintLoaded(Blueprint)) 49 | { 50 | return NAME_None; 51 | } 52 | 53 | if (UDlgManager::DoesObjectImplementDialogueParticipantInterface(Blueprint)) 54 | { 55 | return IDlgDialogueParticipant::Execute_GetParticipantName(Blueprint->GeneratedClass->GetDefaultObject()); 56 | } 57 | } 58 | 59 | return NAME_None; 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/SGraphNode_DialogueK2Select.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "Widgets/DeclarativeSyntaxSupport.h" 6 | #include "KismetNodes/SGraphNodeK2Base.h" 7 | 8 | class UDialogueK2Node_Select; 9 | 10 | class SGraphNode_DialogueK2Select : public SGraphNodeK2Base 11 | { 12 | typedef SGraphNodeK2Base Super; 13 | typedef SGraphNode_DialogueK2Select Self; 14 | 15 | public: 16 | SLATE_BEGIN_ARGS(Self) {} 17 | SLATE_END_ARGS() 18 | 19 | void Construct(const FArguments& InArgs, UDialogueK2Node_Select* InNode); 20 | 21 | // SGraphNode interface 22 | void CreatePinWidgets() override; 23 | 24 | protected: 25 | void CreateOutputSideAddButton(TSharedPtr OutputBox) override; 26 | EVisibility IsAddPinButtonVisible() const override; 27 | FReply OnAddPin() override; 28 | // End of SGraphNode interface 29 | 30 | private: 31 | // The blueprint dialogue select this view represents 32 | UDialogueK2Node_Select* DialogueK2Node_Select = nullptr; 33 | }; 34 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/BlueprintNodes/SGraphNode_DialogueK2Switch.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "Widgets/DeclarativeSyntaxSupport.h" 6 | #include "KismetNodes/SGraphNodeK2Base.h" 7 | 8 | 9 | class UDialogueK2Node_SwitchDialogueCallback; 10 | 11 | class SGraphNode_DialogueK2Switch : public SGraphNodeK2Base 12 | { 13 | typedef SGraphNodeK2Base Super; 14 | typedef SGraphNode_DialogueK2Switch Self; 15 | 16 | public: 17 | SLATE_BEGIN_ARGS(Self) {} 18 | SLATE_END_ARGS() 19 | 20 | void Construct(const FArguments& InArgs, UDialogueK2Node_SwitchDialogueCallback* InNode); 21 | 22 | // SGraphNode interface 23 | void CreatePinWidgets() override; 24 | 25 | protected: 26 | void CreateOutputSideAddButton(TSharedPtr OutputBox) override; 27 | EVisibility IsAddPinButtonVisible() const override; 28 | FReply OnAddPin() override; 29 | // End of SGraphNode interface 30 | 31 | private: 32 | // The blueprint dialogue switch this view represents 33 | UDialogueK2Node_SwitchDialogueCallback* DialogueK2Node_Switch = nullptr; 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Browser/DialogueTreeProperties/DlgBrowserTreeParticipantProperties.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | #include "CoreMinimal.h" 4 | 5 | #include "DlgBrowserTreeVariableProperties.h" 6 | #include "DlgSystem/TreeViewHelpers/DlgTreeViewParticipantProperties.h" 7 | 8 | /** Used as a key in the fast lookup table. */ 9 | class FDlgBrowserTreeParticipantProperties : public FDlgTreeViewParticipantProperties 10 | { 11 | typedef FDlgBrowserTreeParticipantProperties Self; 12 | typedef FDlgTreeViewParticipantProperties Super; 13 | 14 | public: 15 | FDlgBrowserTreeParticipantProperties(const TSet>& InDialogues) : Super(InDialogues) {} 16 | FDlgBrowserTreeParticipantProperties(const TSet>&& InDialogues) : Super(InDialogues) {} 17 | }; 18 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Browser/DialogueTreeProperties/DlgBrowserTreeVariableProperties.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgBrowserTreeVariableProperties.h" 3 | 4 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 5 | // FDialogueTreeVariableProperties 6 | FDlgBrowserTreeVariableProperties::FDlgBrowserTreeVariableProperties(const TSet>& InDialogues) 7 | : Super(InDialogues) 8 | { 9 | // Empty initialize the graph nodes 10 | for (TWeakObjectPtr Dialogue: InDialogues) 11 | { 12 | GraphNodes.Add(Dialogue->GetGUID(), {}); 13 | } 14 | 15 | // Empty initialize the edge nodes 16 | for (TWeakObjectPtr Dialogue : InDialogues) 17 | { 18 | EdgeNodes.Add(Dialogue->GetGUID(), {}); 19 | } 20 | } 21 | 22 | void FDlgBrowserTreeVariableProperties::AddDialogue(TWeakObjectPtr Dialogue) 23 | { 24 | Super::AddDialogue(Dialogue); 25 | 26 | // Initialize the graph nodes 27 | { 28 | const FGuid Id = Dialogue->GetGUID(); 29 | auto* SetPtr = GraphNodes.Find(Id); 30 | if (SetPtr == nullptr) 31 | { 32 | // Does not exist, empty initialize. 33 | GraphNodes.Add(Id, {}); 34 | } 35 | } 36 | 37 | // Initialize the edge nodes 38 | { 39 | 40 | const FGuid ID = Dialogue->GetGUID(); 41 | auto* SetPtr = EdgeNodes.Find(ID); 42 | if (SetPtr == nullptr) 43 | { 44 | // Does not exist, empty initialize. 45 | EdgeNodes.Add(ID, {}); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Browser/DialogueTreeProperties/DlgBrowserTreeVariableProperties.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgSystem/DlgManager.h" 7 | #include "DlgSystem/TreeViewHelpers/DlgTreeViewVariableProperties.h" 8 | 9 | class UDialogueGraphNode; 10 | class UDialogueGraphNode_Edge; 11 | class UDlgDialogue; 12 | class FDlgBrowserTreeVariableProperties; 13 | 14 | class FDlgBrowserTreeVariableProperties : public FDlgTreeViewVariableProperties 15 | { 16 | typedef FDlgBrowserTreeVariableProperties Self; 17 | typedef FDlgTreeViewVariableProperties Super; 18 | 19 | public: 20 | FDlgBrowserTreeVariableProperties(const TSet>& InDialogues); 21 | 22 | // Dialogues: 23 | void AddDialogue(TWeakObjectPtr Dialogue) override; 24 | 25 | // GraphNodes: 26 | bool HasGraphNodeSet(const FGuid& DialogueGUID) { return GraphNodes.Find(DialogueGUID) != nullptr; } 27 | TSet>* GetMutableGraphNodeSet(const FGuid& DialogueGUID) 28 | { 29 | return GraphNodes.Find(DialogueGUID); 30 | } 31 | const TSet>& GetGraphNodeSet(const FGuid& DialogueGUID) const 32 | { 33 | auto* SetPtr = GraphNodes.Find(DialogueGUID); 34 | check(SetPtr); 35 | return *SetPtr; 36 | } 37 | 38 | // EdgeNodes: 39 | bool HasEdgeNodeSet(const FGuid& DialogueGUID) { return EdgeNodes.Find(DialogueGUID) != nullptr; } 40 | TSet>* GetMutableEdgeNodeSet(const FGuid& DialogueGUID) 41 | { 42 | return EdgeNodes.Find(DialogueGUID); 43 | } 44 | const TSet>& GetEdgeNodeSet(const FGuid& DialogueGUID) const 45 | { 46 | auto* SetPtr = EdgeNodes.Find(DialogueGUID); 47 | check(SetPtr); 48 | return *SetPtr; 49 | } 50 | 51 | protected: 52 | /** 53 | * All the nodes that contain this variable property 54 | * Key: The unique identifier for the Dialogue 55 | * Value: All nodes in the Dialogue that contain this variable name. 56 | */ 57 | TMap>> GraphNodes; 58 | 59 | /** 60 | * All the edge nodes that contain this variable property 61 | * Key: The unique identifier for the Dialogue 62 | * Value: All edge in the Dialogue that contain this condition. 63 | */ 64 | TMap>> EdgeNodes; 65 | }; 66 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Browser/DlgBrowserUtilities.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | 3 | #include "DlgBrowserUtilities.h" 4 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Browser/DlgBrowserUtilities.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "DlgBrowserTreeNode.h" 7 | #include "DialogueTreeProperties/DlgBrowserTreeParticipantProperties.h" 8 | 9 | enum class EDlgBrowserSortOption : uint8 10 | { 11 | Name = 0, 12 | DialogueReferences 13 | }; 14 | 15 | struct FDlgBrowserSortOption 16 | { 17 | public: 18 | FDlgBrowserSortOption(EDlgBrowserSortOption InOption, FName InName) 19 | : Option(InOption), Name(InName) {} 20 | 21 | FName GetFName() const { return Name; } 22 | FText GetFText() const { return FText::FromName(Name); } 23 | FString GetFString() const { return Name.ToString(); } 24 | 25 | bool IsByName() const { return Option == EDlgBrowserSortOption::Name; } 26 | 27 | public: 28 | EDlgBrowserSortOption Option; 29 | 30 | // The name of the option. 31 | FName Name; 32 | 33 | // TODO add ascending descending 34 | }; 35 | 36 | class FDlgBrowserUtilities 37 | { 38 | public: 39 | // Compare two FDlgBrowserTreeNode 40 | static bool PredicateCompareDialogueTreeNode( 41 | const TSharedPtr& FirstNode, 42 | const TSharedPtr SecondNode 43 | ) 44 | { 45 | check(FirstNode.IsValid()); 46 | check(SecondNode.IsValid()); 47 | return *FirstNode == *SecondNode; 48 | } 49 | 50 | // Predicate that sorts participants by dialogue number references, in descending order. 51 | static bool PredicateSortByDialoguesNumDescending( 52 | FName FirstParticipant, 53 | FName SecondParticipant, 54 | const TMap>& ParticipantsProperties 55 | ) 56 | { 57 | int32 FirstNum = 0; 58 | int32 SecondNum = 0; 59 | 60 | const TSharedPtr* FirstPtr = 61 | ParticipantsProperties.Find(FirstParticipant); 62 | if (FirstPtr) 63 | { 64 | FirstNum = (*FirstPtr)->GetDialogues().Num(); 65 | } 66 | const TSharedPtr* SecondPtr = 67 | ParticipantsProperties.Find(SecondParticipant); 68 | if (SecondPtr) 69 | { 70 | SecondNum = (*SecondPtr)->GetDialogues().Num(); 71 | } 72 | 73 | return FirstNum > SecondNum; 74 | } 75 | }; 76 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Commandlets/DlgCommandletHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #include "FileHelpers.h" 7 | #include "DlgSystem/DlgDialogue.h" 8 | #include "DlgSystem/DlgManager.h" 9 | 10 | 11 | class FDlgCommandletHelper 12 | { 13 | public: 14 | static bool SaveAllDirtyDialogues() 15 | { 16 | // Save all dirty packages 17 | constexpr bool bPromptUserToSave = false; 18 | constexpr bool bFastSave = true; 19 | constexpr bool bNotifyNoPackagesSaved = false; 20 | constexpr bool bCanBeDeclined = false; 21 | static TArray SaveContentClasses = { UDlgDialogue::StaticClass() }; 22 | return FEditorFileUtils::SaveDirtyContentPackages(SaveContentClasses, bPromptUserToSave, bFastSave, bNotifyNoPackagesSaved, bCanBeDeclined); 23 | } 24 | 25 | static bool SaveAllDialogues() 26 | { 27 | TArray Dialogues = UDlgManager::GetAllDialoguesFromMemory(); 28 | TArray PackagesToSave; 29 | for (UDlgDialogue* Dialogue : Dialogues) 30 | { 31 | Dialogue->OnPreAssetSaved(); 32 | Dialogue->MarkPackageDirty(); 33 | PackagesToSave.Add(Dialogue->GetOutermost()); 34 | } 35 | 36 | static constexpr bool bCheckDirty = false; 37 | return UEditorLoadingAndSavingUtils::SavePackages(PackagesToSave, bCheckDirty); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Commandlets/DlgStatsCommandlet.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Commandlets/Commandlet.h" 5 | 6 | #include "DlgStatsCommandlet.generated.h" 7 | 8 | DECLARE_LOG_CATEGORY_EXTERN(LogDlgStatsCommandlet, All, All); 9 | 10 | 11 | class UDlgDialogue; 12 | class UDlgNode; 13 | 14 | 15 | struct FDlgStatsDialogue 16 | { 17 | public: 18 | int32 WordCount = 0; 19 | 20 | FDlgStatsDialogue& operator+=(const FDlgStatsDialogue& Other) 21 | { 22 | WordCount += Other.WordCount; 23 | return *this; 24 | } 25 | 26 | }; 27 | 28 | 29 | UCLASS() 30 | class UDlgStatsCommandlet: public UCommandlet 31 | { 32 | GENERATED_BODY() 33 | 34 | public: 35 | UDlgStatsCommandlet(); 36 | 37 | public: 38 | 39 | //~ UCommandlet interface 40 | int32 Main(const FString& Params) override; 41 | 42 | bool GetStatsForDialogue(const UDlgDialogue& Dialogue, FDlgStatsDialogue& OutStats); 43 | int32 GetNodeWordCount(const UDlgNode& Node) const; 44 | 45 | int32 GetStringWordCount(const FString& String) const; 46 | int32 GetFNameWordCount(const FName Name) const { return GetStringWordCount(Name.ToString()); } 47 | int32 GetTextWordCount(const FText& Text) const { return GetStringWordCount(Text.ToString()); } 48 | }; 49 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgCommands.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Framework/Commands/Commands.h" 5 | 6 | #include "DlgStyle.h" 7 | 8 | // Add menu commands and stuff, if you want to that is 9 | class DLGSYSTEMEDITOR_API FDlgCommands : public TCommands 10 | { 11 | public: 12 | FDlgCommands() 13 | : TCommands( 14 | TEXT("DlgSystemEditor"), // Context name for fast lookup 15 | NSLOCTEXT("Contexts", "DlgSystemEditor", "DlgSystem Editor"), // Localized context name for displaying 16 | NAME_None, // Parent 17 | FDlgStyle::Get()->GetStyleSetName() // Icon Style Set 18 | ) 19 | { 20 | } 21 | 22 | // 23 | // TCommand<> interface 24 | // 25 | void RegisterCommands() override; 26 | 27 | public: 28 | // Reloads the dialogue data from the .dlg text file that match the name of this dialogue 29 | TSharedPtr DialogueReloadData; 30 | 31 | // Draw edge texts 32 | TSharedPtr ToggleShowEdgeText; 33 | 34 | // Shows the primary/secondary edges 35 | TSharedPtr ToggleShowPrimarySecondaryEdges; 36 | 37 | // Draw the primary edges 38 | TSharedPtr ToggleDrawPrimaryEdges; 39 | 40 | // Draw the secondary edges 41 | TSharedPtr ToggleDrawSecondaryEdges; 42 | 43 | // Draw events and conditions 44 | TSharedPtr ToggleShowEventsAndConditions; 45 | 46 | // Converts a speech sequence node to a list of speech node 47 | TSharedPtr ConvertSpeechSequenceNodeToSpeechNodes; 48 | 49 | // Converts a list of speech nodes a speech sequence node 50 | TSharedPtr ConvertSpeechNodesToSpeechSequence; 51 | 52 | // Saves all the dialogues 53 | TSharedPtr SaveAllDialogues; 54 | 55 | // Delete all the dialogues text files 56 | TSharedPtr DeleteAllDialoguesTextFiles; 57 | 58 | // Delete all the text files for the CURRENT Dialogue 59 | TSharedPtr DeleteCurrentDialogueTextFiles; 60 | 61 | // External links 62 | TSharedPtr OpenNotYetPlugins; 63 | TSharedPtr OpenMarketplace; 64 | TSharedPtr OpenWiki; 65 | TSharedPtr OpenDiscord; 66 | TSharedPtr OpenForum; 67 | 68 | // Open find in ALL Dialogues search window 69 | TSharedPtr FindInAllDialogues; 70 | 71 | // Open find in current Dialogue tab 72 | TSharedPtr FindInDialogue; 73 | 74 | // Hide Selected Node 75 | TSharedPtr HideNodes; 76 | 77 | // UnHide all nodes 78 | TSharedPtr UnHideAllNodes; 79 | }; 80 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgContentBrowserExtensions.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "ContentBrowserFrontEndFilterExtension.h" 6 | 7 | #include "DlgContentBrowserExtensions.generated.h" 8 | 9 | /** 10 | * Register custom filters with the content browser 11 | */ 12 | UCLASS() 13 | class DLGSYSTEMEDITOR_API UDlgSearchFilter : public UContentBrowserFrontEndFilterExtension 14 | { 15 | public: 16 | GENERATED_BODY() 17 | 18 | // UContentBrowserFrontEndFilterExtension interface 19 | void AddFrontEndFilterExtensions( 20 | TSharedPtr DefaultCategory, 21 | TArray>& InOutFilterList 22 | ) const override; 23 | }; 24 | 25 | /** 26 | * Integrate DlgSystem actions associated with existing engine types (e.g., DlgSystem) into the content browser. 27 | * When you right click on a specific asset for example. 28 | * See Paper2D class for proper example FPaperContentBrowserExtensions 29 | */ 30 | class FDlgContentBrowserExtensions 31 | { 32 | public: 33 | static void InstallHooks(); 34 | static void RemoveHooks(); 35 | }; 36 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgEditorAccess.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DlgSystem/IDlgEditorAccess.h" 5 | #include "DlgSystemEditor/DlgEditorUtilities.h" 6 | 7 | /** 8 | * Implementation of the interface for dialogue graph interaction between DlgSystem module <-> DlgSystemEditor module. 9 | * Set in UDialogueGraph constructor for Each Dialogue 10 | */ 11 | class DLGSYSTEMEDITOR_API FDlgEditorAccess : public IDlgEditorAccess 12 | { 13 | public: 14 | FDlgEditorAccess() {} 15 | ~FDlgEditorAccess() {} 16 | 17 | void UpdateGraphNodeEdges(UEdGraphNode* GraphNode) override; 18 | UEdGraph* CreateNewDialogueGraph(UDlgDialogue* Dialogue) const override; 19 | void CompileDialogueNodesFromGraphNodes(UDlgDialogue* Dialogue) const override; 20 | void RemoveAllGraphNodes(UDlgDialogue* Dialogue) const override; 21 | void UpdateDialogueToVersion_UseOnlyOneOutputAndInputPin(UDlgDialogue* Dialogue) const override; 22 | void SetNewOuterForObjectFromGraphNode(UObject* Object, UEdGraphNode* GraphNode) const override; 23 | 24 | bool AreDialogueNodesInSyncWithGraphNodes(UDlgDialogue* Dialogue) const override 25 | { 26 | return FDlgEditorUtilities::AreDialogueNodesInSyncWithGraphNodes(Dialogue); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgSystemEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | 6 | public class DlgSystemEditor : ModuleRules 7 | { 8 | public DlgSystemEditor(ReadOnlyTargetRules Target) : base(Target) 9 | { 10 | // Enable IWYU 11 | // https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/index.html 12 | // https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/Configuration/ 13 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 14 | 15 | #if UE_5_2_OR_LATER 16 | IWYUSupport = IWYUSupport.Full; 17 | #else 18 | bEnforceIWYU = true; 19 | #endif 20 | 21 | // bUseUnity = false; 22 | 23 | //if ((Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) 24 | // && WindowsPlatform.Compiler >= WindowsCompiler.VisualStudio2015) 25 | //{ 26 | //Definitions.Add("/Wall"); 27 | //} 28 | 29 | // Docs see https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/ModuleFiles/ 30 | 31 | PublicDependencyModuleNames.AddRange( 32 | new string[] { 33 | "Core", 34 | "DlgSystem", 35 | // ... add other public dependencies that you statically link with here ... 36 | }); 37 | 38 | 39 | PrivateDependencyModuleNames.AddRange( 40 | new string[] { 41 | // Core modules 42 | "Engine", 43 | "CoreUObject", 44 | "Projects", // IPluginManager 45 | "UnrealEd", // for FAssetEditorManager 46 | "RenderCore", 47 | "InputCore", 48 | "SlateCore", 49 | "Slate", 50 | "EditorStyle", 51 | "MessageLog", 52 | "EditorWidgets", 53 | 54 | // Accessing the menu 55 | "WorkspaceMenuStructure", 56 | 57 | // Details/Property editor 58 | "DetailCustomizations", 59 | "PropertyEditor", 60 | 61 | // Used for the Blueprint Nodes 62 | "BlueprintGraph", 63 | "Kismet", 64 | "KismetCompiler", 65 | "KismetWidgets", 66 | 67 | // graph stuff 68 | "GraphEditor", 69 | "ContentBrowser", 70 | 71 | // e.g. FPlatformApplicationMisc::ClipboardCopy 72 | "ApplicationCore", 73 | }); 74 | 75 | #if UE_4_24_OR_LATER 76 | PrivateDependencyModuleNames.Add("ToolMenus"); 77 | #endif 78 | #if UE_4_26_OR_LATER 79 | PrivateDependencyModuleNames.Add("ContentBrowserData"); 80 | #endif 81 | #if UE_5_0_OR_LATER 82 | PrivateDependencyModuleNames.Add("EditorFramework"); 83 | #endif 84 | 85 | PrivateIncludePathModuleNames.AddRange( 86 | new string[] { 87 | "AssetRegistry", 88 | "AssetTools", 89 | }); 90 | 91 | DynamicallyLoadedModuleNames.AddRange( 92 | new string[] { 93 | // ... add any modules that your module loads dynamically here ... 94 | }); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgThumbnailRenderer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgThumbnailRenderer.h" 3 | 4 | #include "CanvasTypes.h" 5 | 6 | ////////////////////////////////////////////////////////////////////////// 7 | // UPaperTileSetThumbnailRenderer 8 | 9 | UDlgThumbnailRenderer::UDlgThumbnailRenderer(const FObjectInitializer& ObjectInitializer) 10 | : Super(ObjectInitializer) 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/DlgThumbnailRenderer.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "ThumbnailRendering/DefaultSizedThumbnailRenderer.h" 5 | #include "Runtime/Launch/Resources/Version.h" 6 | 7 | #include "DlgThumbnailRenderer.generated.h" 8 | 9 | // Useful if you want to have fancy thumbnail previews. 10 | UCLASS() 11 | class DLGSYSTEMEDITOR_API UDlgThumbnailRenderer : public UDefaultSizedThumbnailRenderer 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | UDlgThumbnailRenderer(const FObjectInitializer& ObjectInitializer); 17 | 18 | // UThumbnailRenderer interface 19 | // #if NY_ENGINE_VERSION >= 425 20 | // void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* Target, FCanvas* Canvas, bool bAdditionalViewFamily) override; 21 | // #else 22 | // void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* Target, FCanvas* Canvas,) override; 23 | // #endif 24 | }; 25 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgAsset_Details.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgAsset_Details.h" 3 | 4 | #include "DetailCategoryBuilder.h" 5 | #include "DetailLayoutBuilder.h" 6 | 7 | #include "DlgSystem/DlgDialogue.h" 8 | 9 | #define LOCTEXT_NAMESPACE "Dialogue_Details" 10 | 11 | void FDlgAsset_Details::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) 12 | { 13 | TArray> ObjectsBeingCustomized; 14 | DetailBuilder.GetObjectsBeingCustomized(ObjectsBeingCustomized); 15 | // Only support one object being customized 16 | if (ObjectsBeingCustomized.Num() != 1) 17 | { 18 | return; 19 | } 20 | 21 | UClass* DialogueClass = UDlgDialogue::StaticClass(); 22 | // IDetailCategoryBuilder& GeneratedCategory = DetailBuilder.EditCategory(TEXT("Generated")); 23 | // GeneratedCategory.InitiallyCollapsed(false); 24 | // GeneratedCategory.AddProperty(UDlgDialogue::GetMemberNameName(), DialogueClass); 25 | // GeneratedCategory.AddProperty(UDlgDialogue::GetMemberNameGUID(), DialogueClass); 26 | // GeneratedCategory.AddProperty(UDlgDialogue::GetMemberNameParticipantsData(), DialogueClass); 27 | 28 | IDetailCategoryBuilder& DataCategory = DetailBuilder.EditCategory(TEXT("DialogueData")); 29 | DataCategory.InitiallyCollapsed(false); 30 | // DataCategory.AddProperty(UDlgDialogue::GetMemberNameStartNode(), DialogueClass) 31 | // .ShouldAutoExpand(true); 32 | // DataCategory.AddProperty(UDlgDialogue::GetMemberNameNodes(), DialogueClass) 33 | // .ShouldAutoExpand(true); 34 | } 35 | 36 | ////////////////////////////////////////////////////////////////////////// 37 | 38 | #undef LOCTEXT_NAMESPACE 39 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgAsset_Details.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "IDetailCustomization.h" 5 | 6 | /** 7 | * How the details customization panel looks for the DlgDialogue object. 8 | * See FDlgSystemEditorModule::StartupModule for usage. 9 | */ 10 | class DLGSYSTEMEDITOR_API FDlgAsset_Details : public IDetailCustomization 11 | { 12 | typedef FDlgAsset_Details Self; 13 | public: 14 | // Makes a new instance of this detail layout class for a specific detail view requesting it 15 | static TSharedRef MakeInstance() { return MakeShared(); } 16 | 17 | // IDetailCustomization interface 18 | /** Called when details should be customized */ 19 | void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgNode_Details.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNode_Details.h" 3 | 4 | #include "DetailCategoryBuilder.h" 5 | #include "DetailLayoutBuilder.h" 6 | #include "Widgets/Text/STextBlock.h" 7 | #include "DetailWidgetRow.h" 8 | 9 | #include "DlgSystem/Nodes/DlgNode.h" 10 | #include "DlgSystemEditor/Editor/Nodes/DialogueGraphNode.h" 11 | 12 | #define LOCTEXT_NAMESPACE "DialogueNode_Details" 13 | 14 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 15 | // FDlgNode_Details 16 | void FDlgNode_Details::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) 17 | { 18 | TArray> ObjectsBeingCustomized; 19 | DetailBuilder.GetObjectsBeingCustomized(ObjectsBeingCustomized); 20 | // Only support one object being customized 21 | if (ObjectsBeingCustomized.Num() != 1) 22 | { 23 | return; 24 | } 25 | 26 | // NOTE currently not used, see FDialogueGraphNodeDetails 27 | IDetailCategoryBuilder& DataCategory = DetailBuilder.EditCategory(TEXT("Do we need this?")); 28 | DataCategory.InitiallyCollapsed(false); 29 | DataCategory.AddCustomRow(NSLOCTEXT("TEST", "MyWarningRowFilterString", "Search Filter Keywords")) 30 | .Visibility(EVisibility::Visible) 31 | .WholeRowContent() 32 | [ 33 | SNew(STextBlock) 34 | .Text(LOCTEXT("MyWarningTest", "BaseString should not be empty!")) 35 | ]; 36 | } 37 | 38 | #undef LOCTEXT_NAMESPACE 39 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgNode_Details.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreMinimal.h" 5 | #include "IDetailCustomization.h" 6 | 7 | /** 8 | * How the details customization panel looks for the UDlgNode (and derived types) 9 | * See FDlgSystemEditorModule::StartupModule for usage. 10 | */ 11 | class DLGSYSTEMEDITOR_API FDlgNode_Details : public IDetailCustomization 12 | { 13 | typedef FDlgNode_Details Self; 14 | 15 | public: 16 | // Makes a new instance of this detail layout class for a specific detail view requesting it 17 | static TSharedRef MakeInstance() { return MakeShared(); } 18 | 19 | // IDetailCustomization interface 20 | /** Called when details should be customized */ 21 | void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override; 22 | }; 23 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgParticipantName_Details.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgParticipantName_Details.h" 3 | 4 | #include "IDetailPropertyRow.h" 5 | #include "IDetailChildrenBuilder.h" 6 | 7 | #include "DlgSystemEditor/Editor/DetailsPanel/Widgets/SDlgTextPropertyPickList.h" 8 | #include "DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgTextPropertyPickList_CustomRowHelper.h" 9 | 10 | #include "DlgSystem/DlgParticipantName.h" 11 | #include "DlgSystem/DlgManager.h" 12 | 13 | #define LOCTEXT_NAMESPACE "DialogueParticipantName_Details" 14 | 15 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 16 | // FNYWhistlerComponentNameCustomization 17 | void FDlgParticipantName_Details::CustomizeHeader(TSharedRef InStructPropertyHandle, 18 | FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) 19 | { 20 | StructPropertyHandle = InStructPropertyHandle; 21 | } 22 | 23 | void FDlgParticipantName_Details::CustomizeChildren(TSharedRef InStructPropertyHandle, 24 | IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) 25 | { 26 | // ParticipantName 27 | { 28 | const TSharedPtr ParticipantNamePropertyHandle = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FDlgParticipantName, ParticipantName)); 29 | FDetailWidgetRow* DetailWidgetRow = &StructBuilder.AddCustomRow(InStructPropertyHandle->GetPropertyDisplayName()); 30 | ParticipantNamePropertyRow = MakeShared(DetailWidgetRow, ParticipantNamePropertyHandle); 31 | ParticipantNamePropertyRow->SetTextPropertyPickListWidget( 32 | SNew(SDlgTextPropertyPickList) 33 | .AvailableSuggestions(this, &Self::GetAllParticipantNames) 34 | .HasContextCheckbox(false) 35 | ); 36 | ParticipantNamePropertyRow->SetParentStructPropertyHandle(InStructPropertyHandle); 37 | ParticipantNamePropertyRow->Update(); 38 | } 39 | } 40 | 41 | 42 | TArray FDlgParticipantName_Details::GetAllParticipantNames() const 43 | { 44 | return UDlgManager::GetDialoguesParticipantNames(); 45 | } 46 | 47 | #undef LOCTEXT_NAMESPACE 48 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/DlgParticipantName_Details.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "IPropertyTypeCustomization.h" 5 | #include "Layout/Visibility.h" 6 | #include "IDetailPropertyRow.h" 7 | 8 | class FDlgTextPropertyPickList_CustomRowHelper; 9 | 10 | class DLGSYSTEMEDITOR_API FDlgParticipantName_Details : public IPropertyTypeCustomization 11 | { 12 | typedef FDlgParticipantName_Details Self; 13 | 14 | public: 15 | static TSharedRef MakeInstance() { return MakeShared(); } 16 | 17 | void CustomizeHeader(TSharedRef StructPropertyHandle, 18 | FDetailWidgetRow& HeaderRow, 19 | IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 20 | 21 | void CustomizeChildren(TSharedRef StructPropertyHandle, 22 | IDetailChildrenBuilder& StructBuilder, 23 | IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 24 | 25 | private: 26 | 27 | /** Gathers selectable options. */ 28 | TArray GetAllParticipantNames() const; 29 | 30 | private: 31 | // Cache the some property handles 32 | TSharedPtr StructPropertyHandle; 33 | 34 | // Cache the rows of the properties, created in CustomizeChildren 35 | TSharedPtr ParticipantNamePropertyRow; 36 | }; 37 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgBase_CustomRowHelper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgBase_CustomRowHelper.h" 3 | 4 | #include "PropertyHandle.h" 5 | #include "DetailWidgetRow.h" 6 | 7 | #define LOCTEXT_NAMESPACE "TextPropertyPickListCustomRowHelper" 8 | 9 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 10 | // FDlgBase_CustomRowHelper 11 | FDlgBase_CustomRowHelper::FDlgBase_CustomRowHelper(FDetailWidgetRow* InDetailWidgetRow, const TSharedPtr& InPropertyHandle) : 12 | DetailWidgetRow(InDetailWidgetRow), 13 | PropertyHandle(InPropertyHandle), 14 | DisplayName(DetailWidgetRow->FilterTextString), 15 | ToolTip(InPropertyHandle->GetToolTipText()) 16 | { 17 | check(DetailWidgetRow); 18 | check(PropertyHandle.IsValid()); 19 | } 20 | 21 | /** Build the full property row. */ 22 | void FDlgBase_CustomRowHelper::Update() 23 | { 24 | // Set display name and tooltips 25 | // Sets a string which should be used to filter the content when a user searches 26 | DetailWidgetRow->FilterString(DisplayName); 27 | PropertyHandle->SetToolTipText(ToolTip); 28 | 29 | NameContentWidget = PropertyHandle->CreatePropertyNameWidget(DisplayName, ToolTip); 30 | 31 | // NOTE set the tooltip of your value content widget inside the implementation class. 32 | UpdateInternal(); 33 | } 34 | 35 | #undef LOCTEXT_NAMESPACE 36 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgBase_CustomRowHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DetailWidgetRow.h" 5 | 6 | class FDetailWidgetRow; 7 | 8 | /** 9 | * Base class for all Custom Row Helpers. 10 | * Makes sure that the ToolTips and Display Names are in sync with the PropertyHandle and the SWidget that is represented by. 11 | */ 12 | class DLGSYSTEMEDITOR_API FDlgBase_CustomRowHelper 13 | { 14 | typedef FDlgBase_CustomRowHelper Self; 15 | public: 16 | FDlgBase_CustomRowHelper(FDetailWidgetRow* InDetailWidgetRow, const TSharedPtr& InPropertyHandle); 17 | virtual ~FDlgBase_CustomRowHelper() {} 18 | 19 | // Sets the localized display name of the property. 20 | Self& SetDisplayName(const FText& InDisplayName) 21 | { 22 | DisplayName = InDisplayName; 23 | return *this; 24 | } 25 | 26 | // Sets the localized tooltip of the property. 27 | Self& SetToolTip(const FText& InToolTip) 28 | { 29 | ToolTip = InToolTip; 30 | return *this; 31 | } 32 | 33 | // Sets the visibility of this property. 34 | Self& SetVisibility(const TAttribute& InVisibility) 35 | { 36 | DetailWidgetRow->Visibility(InVisibility); 37 | return *this; 38 | } 39 | 40 | // Set the optional utils 41 | Self& SetPropertyUtils(const TSharedPtr& Utils) 42 | { 43 | PropertyUtils = Utils; 44 | return *this; 45 | } 46 | 47 | // Update the full property row. 48 | void Update(); 49 | 50 | protected: 51 | // Internal update method that must be implemented. Called after Update finishes. 52 | virtual void UpdateInternal() = 0; 53 | 54 | protected: 55 | // The custom widget row this represents 56 | FDetailWidgetRow* DetailWidgetRow = nullptr; 57 | 58 | // Helpers class 59 | TSharedPtr PropertyUtils; 60 | 61 | // The Property handle of what this row represents 62 | TSharedPtr PropertyHandle; 63 | 64 | // The NameContent Widget. 65 | TSharedPtr NameContentWidget; 66 | 67 | // Texts used for this property row. 68 | FText DisplayName; 69 | FText ToolTip; 70 | }; 71 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgIntTextBox_CustomRowHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DetailWidgetRow.h" 5 | 6 | #include "Widgets/Input/SMultiLineEditableTextBox.h" 7 | #include "DlgBase_CustomRowHelper.h" 8 | #include "SDlgTextPropertyEditableTextBox.h" 9 | 10 | class FDetailWidgetRow; 11 | class UDlgDialogue; 12 | 13 | // Custom row for integers 14 | class DLGSYSTEMEDITOR_API FDlgIntTextBox_CustomRowHelper : 15 | public FDlgBase_CustomRowHelper, 16 | public TSharedFromThis 17 | { 18 | typedef FDlgIntTextBox_CustomRowHelper Self; 19 | typedef FDlgBase_CustomRowHelper Super; 20 | public: 21 | FDlgIntTextBox_CustomRowHelper( 22 | FDetailWidgetRow* InDetailWidgetRow, 23 | const TSharedPtr& InPropertyHandle, 24 | const UDlgDialogue* InDialogue 25 | ) : FDlgBase_CustomRowHelper(InDetailWidgetRow, InPropertyHandle), Dialogue(InDialogue) {} 26 | 27 | Self& SetJumpToNodeVisibility(const TAttribute& Visibility) 28 | { 29 | JumpToNodeVisibility = Visibility; 30 | return *this; 31 | } 32 | 33 | protected: 34 | void UpdateInternal() override; 35 | 36 | // Reset to default 37 | FText GetResetToolTip() const; 38 | EVisibility GetDiffersFromDefaultAsVisibility() const; 39 | FReply OnResetClicked(); 40 | FReply OnJumpToNodeClicked(); 41 | 42 | private: 43 | bool bAddResetToDefaultWidget = true; 44 | 45 | TWeakObjectPtr Dialogue = nullptr; 46 | TAttribute JumpToNodeVisibility; 47 | }; 48 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgObject_CustomRowHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DlgSystemEditor/DlgEditorUtilities.h" 5 | #include "IDetailPropertyRow.h" 6 | 7 | class FDetailWidgetRow; 8 | class UDlgDialogue; 9 | class UBlueprint; 10 | 11 | 12 | // Custom row for Objects that most likely are Blueprints? 13 | // This only works with the IDetailPropertyRow::CustomWidget 14 | // If we don't use this the children of EditInlineNew won't be displayed 15 | // Custom row for things that can Handle Objects that are most likely Blueprints or Native Classes 16 | // And this helps us to open them in the Blueprint Editor or open the Native Class inside the IDE 17 | class DLGSYSTEMEDITOR_API FDlgObject_CustomRowHelper : public TSharedFromThis 18 | { 19 | typedef FDlgObject_CustomRowHelper Self; 20 | 21 | public: 22 | FDlgObject_CustomRowHelper(IDetailPropertyRow* InPropertyRow); 23 | virtual ~FDlgObject_CustomRowHelper() {} 24 | 25 | // Update the full property row. 26 | void Update(); 27 | 28 | // Mutually exclusive with 29 | Self& SetFunctionNameToOpen(EDlgBlueprintOpenType InOpenType, FName Name) 30 | { 31 | OpenType = InOpenType; 32 | FunctionNameToOpen = Name; 33 | return *this; 34 | } 35 | 36 | protected: 37 | // Reset to default 38 | virtual FReply OnBrowseClicked(); 39 | virtual FReply OnOpenClicked(); 40 | 41 | virtual UObject* GetObject() const; 42 | UBlueprint* GetBlueprint() const; 43 | bool IsObjectABlueprint() const; 44 | 45 | virtual FText GetBrowseObjectText() const; 46 | virtual FText GetJumpToObjectText() const; 47 | virtual float GetRowMinimumDesiredWidth() const { return 300.f; } 48 | 49 | EVisibility GetOpenButtonVisibility() const; 50 | EVisibility GetBrowseButtonVisibility() const; 51 | virtual bool CanBeVisible() const { return true; } 52 | 53 | protected: 54 | // The Property handle of what this row represents 55 | IDetailPropertyRow* PropertyRow = nullptr; 56 | 57 | // Blueprint Editor 58 | bool bForceFullEditor = true; 59 | FName FunctionNameToOpen = NAME_None; 60 | bool bAddBlueprintFunctionIfItDoesNotExist = true; 61 | EDlgBlueprintOpenType OpenType = EDlgBlueprintOpenType::None; 62 | }; 63 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgTextPropertyPickList_CustomRowHelper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgTextPropertyPickList_CustomRowHelper.h" 3 | 4 | #include "DetailWidgetRow.h" 5 | 6 | #include "DlgSystemEditor/Editor/DetailsPanel/Widgets/SDlgTextPropertyPickList.h" 7 | 8 | #define LOCTEXT_NAMESPACE "TextPropertyPickList_CustomRowHelper" 9 | 10 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | // FDlgTextPropertyPickList_CustomRowHelper 12 | void FDlgTextPropertyPickList_CustomRowHelper::UpdateInternal() 13 | { 14 | check(TextPropertyPickListWidget.IsValid()); 15 | TextPropertyPickListWidget->SetToolTipAttribute(ToolTip); 16 | TextPropertyPickListWidget->SetPropertyHandle(PropertyHandle); 17 | 18 | DetailWidgetRow 19 | ->NameContent() 20 | [ 21 | NameContentWidget.ToSharedRef() 22 | ]; 23 | 24 | if (ParentStructPropertyHandle && ParentStructPropertyHandle->IsValidHandle()) 25 | { 26 | DetailWidgetRow 27 | ->ValueContent() 28 | // Similar to TextProperty, see FTextCustomization 29 | .MinDesiredWidth(209.f) 30 | .MaxDesiredWidth(600.f) 31 | [ 32 | SNew(SHorizontalBox) 33 | +SHorizontalBox::Slot() 34 | .HAlign(HAlign_Fill) 35 | .VAlign(VAlign_Fill) 36 | [ 37 | TextPropertyPickListWidget.ToSharedRef() 38 | ] 39 | +SHorizontalBox::Slot() 40 | .AutoWidth() 41 | .VAlign(VAlign_Center) 42 | [ 43 | ParentStructPropertyHandle->CreateDefaultPropertyButtonWidgets() 44 | ] 45 | ]; 46 | } 47 | else 48 | { 49 | DetailWidgetRow 50 | ->ValueContent() 51 | // Similar to TextProperty, see FTextCustomization 52 | .MinDesiredWidth(209.f) 53 | .MaxDesiredWidth(600.f) 54 | [ 55 | TextPropertyPickListWidget.ToSharedRef() 56 | ]; 57 | } 58 | } 59 | 60 | #undef LOCTEXT_NAMESPACE 61 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/DetailsPanel/Widgets/DlgTextPropertyPickList_CustomRowHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "DetailWidgetRow.h" 5 | 6 | #include "DlgBase_CustomRowHelper.h" 7 | 8 | class SDlgTextPropertyPickList; 9 | class FDetailWidgetRow; 10 | 11 | // Helper for details panel, when we want to use SDlgTextPropertyPickList in a custom row in the details panel 12 | class DLGSYSTEMEDITOR_API FDlgTextPropertyPickList_CustomRowHelper : public FDlgBase_CustomRowHelper 13 | { 14 | typedef FDlgTextPropertyPickList_CustomRowHelper Self; 15 | typedef FDlgBase_CustomRowHelper Super; 16 | public: 17 | FDlgTextPropertyPickList_CustomRowHelper(FDetailWidgetRow* InDetailWidgetRow, const TSharedPtr& InPropertyHandle) 18 | : FDlgBase_CustomRowHelper(InDetailWidgetRow, InPropertyHandle) {} 19 | 20 | // Set the SPropertyPickList 21 | Self& SetTextPropertyPickListWidget(const TSharedRef& InWidget) 22 | { 23 | TextPropertyPickListWidget = InWidget; 24 | return *this; 25 | } 26 | 27 | // Call this before Update is called to have the default buttons (like array add/remove/duplicate) added next to the row 28 | // See FDlgParticipantName_Details for an example 29 | void SetParentStructPropertyHandle(const TSharedRef& InParentStructPropertyHandle) { ParentStructPropertyHandle = InParentStructPropertyHandle; } 30 | 31 | private: 32 | void UpdateInternal() override; 33 | 34 | private: 35 | // The TextPropertyPickList Widget. 36 | TSharedPtr TextPropertyPickListWidget; 37 | 38 | 39 | // Optional struct widget for additional buttons for one liners, only used if set 40 | TSharedPtr ParentStructPropertyHandle; 41 | }; 42 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Graph/SchemaActions/DlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "EdGraph/EdGraphSchema.h" 5 | #include "Templates/SubclassOf.h" 6 | 7 | #include "DlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction.generated.h" 8 | 9 | class UDialogueGraphNode; 10 | class UEdGraph; 11 | 12 | /** 13 | * Action to convert Speech nodes to a Speech Sequence Node. 14 | * This is the opposite of the FDlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction. 15 | */ 16 | USTRUCT() 17 | struct DLGSYSTEMEDITOR_API FDlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction : public FEdGraphSchemaAction 18 | { 19 | GENERATED_USTRUCT_BODY(); 20 | 21 | FDlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction() : FEdGraphSchemaAction() {} 22 | FDlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction(const TArray& InSelectedGraphNodes) 23 | : FEdGraphSchemaAction(), SelectedGraphNodes(InSelectedGraphNodes) {} 24 | 25 | FDlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction( 26 | const FText& InNodeCategory, 27 | const FText& InMenuDesc, 28 | const FText& InToolTip, 29 | int32 InGrouping, 30 | TArray InSelectedGraphNodes 31 | ) : FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping), SelectedGraphNodes(InSelectedGraphNodes) {} 32 | 33 | //~ Begin FEdGraphSchemaAction Interface 34 | UEdGraphNode* PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override; 35 | //~ End FEdGraphSchemaAction Interface 36 | 37 | private: 38 | // Nodes selected that we are going to convert 39 | TArray SelectedGraphNodes; 40 | }; 41 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Graph/SchemaActions/DlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "EdGraph/EdGraphSchema.h" 5 | #include "Templates/SubclassOf.h" 6 | 7 | #include "DlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction.generated.h" 8 | 9 | class UDialogueGraphNode; 10 | class UEdGraph; 11 | 12 | /** 13 | * Action to convert a Speech Sequence node to a list of Speech nodes. 14 | * This is the opposite of the FDlgConvertSpeechNodesToSpeechSequence_GraphSchemaAction. 15 | */ 16 | USTRUCT() 17 | struct DLGSYSTEMEDITOR_API FDlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction : public FEdGraphSchemaAction 18 | { 19 | GENERATED_USTRUCT_BODY(); 20 | 21 | FDlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction() : FEdGraphSchemaAction() {} 22 | FDlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction(UDialogueGraphNode* InSelectedSpeechSequenceGraphNode) 23 | : FEdGraphSchemaAction(), SelectedSpeechSequenceGraphNode(InSelectedSpeechSequenceGraphNode) {} 24 | 25 | FDlgConvertSpeechSequenceNodeToSpeechNodes_GraphSchemaAction( 26 | const FText& InNodeCategory, 27 | const FText& InMenuDesc, 28 | const FText& InToolTip, 29 | int32 InGrouping, 30 | UDialogueGraphNode* InSelectedSpeechSequenceGraphNode 31 | ) : FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping), SelectedSpeechSequenceGraphNode(InSelectedSpeechSequenceGraphNode) {} 32 | 33 | //~ Begin FEdGraphSchemaAction Interface 34 | UEdGraphNode* PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = false) override; 35 | //~ End FEdGraphSchemaAction Interface 36 | 37 | private: 38 | // The speech sequence selected 39 | UDialogueGraphNode* SelectedSpeechSequenceGraphNode = nullptr; 40 | }; 41 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Graph/SchemaActions/DlgNewComment_GraphSchemaAction.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNewComment_GraphSchemaAction.h" 3 | 4 | #include "EdGraphNode_Comment.h" 5 | 6 | #include "DlgSystemEditor/DlgEditorUtilities.h" 7 | 8 | #define LOCTEXT_NAMESPACE "NewComment_DialogueGraphSchemaAction" 9 | 10 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | // FDlgNewComment_GraphSchemaAction 12 | UEdGraphNode* FDlgNewComment_GraphSchemaAction::PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, 13 | const FVector2D Location, bool bSelectNewNode/* = true*/) 14 | { 15 | // Add menu item for creating comment boxes 16 | UEdGraphNode_Comment* CommentTemplate = NewObject(); 17 | 18 | // Wrap comment around other nodes, this makes it possible to select other nodes and press the "C" key on the keyboard. 19 | FVector2D SpawnLocation = Location; 20 | FSlateRect Bounds; 21 | if (FDlgEditorUtilities::GetBoundsForSelectedNodes(ParentGraph, Bounds, 50.0f)) 22 | { 23 | CommentTemplate->SetBounds(Bounds); 24 | SpawnLocation.X = CommentTemplate->NodePosX; 25 | SpawnLocation.Y = CommentTemplate->NodePosY; 26 | } 27 | 28 | return FEdGraphSchemaAction_NewNode::SpawnNodeFromTemplate(ParentGraph, CommentTemplate, SpawnLocation, bSelectNewNode); 29 | } 30 | 31 | #undef LOCTEXT_NAMESPACE 32 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Graph/SchemaActions/DlgNewComment_GraphSchemaAction.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "EdGraph/EdGraphSchema.h" 5 | #include "Templates/SubclassOf.h" 6 | 7 | #include "DlgNewComment_GraphSchemaAction.generated.h" 8 | 9 | class UEdGraph; 10 | 11 | /** Action to create new comment */ 12 | USTRUCT() 13 | struct DLGSYSTEMEDITOR_API FDlgNewComment_GraphSchemaAction : public FEdGraphSchemaAction 14 | { 15 | GENERATED_USTRUCT_BODY(); 16 | 17 | FDlgNewComment_GraphSchemaAction() : FEdGraphSchemaAction() {} 18 | FDlgNewComment_GraphSchemaAction(const FText& InNodeCategory, const FText& InMenuDesc, const FText& InToolTip, int32 InGrouping) 19 | : FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping) {} 20 | 21 | //~ Begin FEdGraphSchemaAction Interface 22 | UEdGraphNode* PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override; 23 | //~ End FEdGraphSchemaAction Interface 24 | }; 25 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Graph/SchemaActions/DlgNewNode_GraphSchemaAction.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "EdGraph/EdGraphSchema.h" 5 | #include "Templates/SubclassOf.h" 6 | 7 | #include "DlgSystem/Nodes/DlgNode.h" 8 | 9 | #include "DlgNewNode_GraphSchemaAction.generated.h" 10 | 11 | class UDialogueGraphNode; 12 | class UDlgDialogue; 13 | class UEdGraph; 14 | 15 | /** Action to add a node to the graph */ 16 | USTRUCT() 17 | struct DLGSYSTEMEDITOR_API FDlgNewNode_GraphSchemaAction : public FEdGraphSchemaAction 18 | { 19 | private: 20 | typedef FDlgNewNode_GraphSchemaAction Self; 21 | 22 | public: 23 | GENERATED_USTRUCT_BODY(); 24 | 25 | FDlgNewNode_GraphSchemaAction() : FEdGraphSchemaAction() {} 26 | FDlgNewNode_GraphSchemaAction( 27 | const FText& InNodeCategory, 28 | const FText& InMenuDesc, const FText& InToolTip, 29 | int32 InGrouping, TSubclassOf InCreateNodeType 30 | ) : FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping), CreateNodeType(InCreateNodeType) {} 31 | 32 | //~ Begin FEdGraphSchemaAction Interface 33 | UEdGraphNode* PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override; 34 | //~ End FEdGraphSchemaAction Interface 35 | 36 | // Spawns a new UDialogueGraphNode of type GraphNodeType that must have a valid DialogueNode of TSubclassOf 37 | template 38 | static GraphNodeType* SpawnGraphNodeWithDialogueNodeFromTemplate( 39 | UEdGraph* ParentGraph, 40 | TSubclassOf CreateNodeType, 41 | const FVector2D Location, 42 | bool bSelectNewNode = true 43 | ) 44 | { 45 | Self Action(FText::GetEmpty(), FText::GetEmpty(), FText::GetEmpty(), 0, CreateNodeType); 46 | return CastChecked(Action.PerformAction(ParentGraph, nullptr, Location, bSelectNewNode)); 47 | } 48 | 49 | private: 50 | /** Creates a new dialogue node from the template */ 51 | UEdGraphNode* CreateNode(UDlgDialogue* Dialogue, UEdGraph* ParentGraph, UEdGraphPin* FromPin, FVector2D Location, bool bSelectNewNode); 52 | 53 | /** Connects new node to output of selected nodes */ 54 | // void ConnectToSelectedNodes(UDialogueNode* NewNodeclass, UEdGraph* ParentGraph) const; 55 | 56 | // The node type used for when creating a new node (used by CreateNode) 57 | TSubclassOf CreateNodeType; 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/IDlgEditor.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Toolkits/AssetEditorToolkit.h" 5 | 6 | class DLGSYSTEMEDITOR_API IDlgEditor : public FAssetEditorToolkit 7 | { 8 | public: 9 | // Get the currently selected set of nodes 10 | virtual TSet GetSelectedNodes() const = 0; 11 | 12 | // Get the bounding area for the currently selected nodes 13 | // 14 | // @param Rect Final output bounding area, including padding 15 | // @param Padding An amount of padding to add to all sides of the bounds 16 | // 17 | // @return false if nothing is selected 18 | virtual bool GetBoundsForSelectedNodes(class FSlateRect& Rect, float Padding) const = 0; 19 | 20 | // Refreshes the details panel with the Dialogue 21 | virtual void RefreshDetailsView(bool bRestorePreviousSelection) = 0; 22 | 23 | // Refresh the viewport and property/details panel. 24 | virtual void Refresh(bool bRestorePreviousSelection) = 0; 25 | 26 | // Useful for setting the last target node on drop operations. 27 | virtual UDialogueGraphNode_Edge* GetLastTargetGraphEdgeBeforeDrag() const = 0; 28 | virtual void SetLastTargetGraphEdgeBeforeDrag(UDialogueGraphNode_Edge* InEdge) = 0; 29 | 30 | // Jump selection to the selected object. 31 | virtual void JumpToObject(const UObject* Object) = 0; 32 | }; 33 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/DialogueGraphNode_Root.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DialogueGraphNode_Root.h" 3 | 4 | #include "DialogueGraphNode.h" 5 | 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 7 | // Begin UEdGraphNode interface 8 | 9 | FText UDialogueGraphNode_Root::GetNodeTitle(ENodeTitleType::Type TitleType) const 10 | { 11 | const TArray StartNodes = GetDialogue()->GetStartNodes(); 12 | if (StartNodes.Num() == 1) 13 | { 14 | return NSLOCTEXT("DialogueGraphNode_Root", "RootTitle", "Start"); 15 | } 16 | 17 | const int32 StartNodeIndex = StartNodes.Find(DialogueNode); 18 | const FString AsString = FString("Start ") + FString::FromInt(StartNodeIndex); 19 | return FText::FromString(AsString); 20 | } 21 | 22 | void UDialogueGraphNode_Root::PinConnectionListChanged(UEdGraphPin* Pin) 23 | { 24 | // Root node can only have output nodes so any other type should not be supported. 25 | if (Pin->Direction == EGPD_Output) 26 | { 27 | Super::PinConnectionListChanged(Pin); 28 | } 29 | } 30 | // End UEdGraphNode interface 31 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 32 | 33 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 34 | // Begin UDialogueGraphNode_Base interface 35 | void UDialogueGraphNode_Root::OnDialoguePropertyChanged(const FPropertyChangedEvent& PropertyChangedEvent) 36 | { 37 | if (!PropertyChangedEvent.Property || !PropertyChangedEvent.MemberProperty) 38 | { 39 | return; 40 | } 41 | 42 | //HandleOnDialoguePropertyChanged(PropertyChangedEvent, GetDialogue()->GetStartNode()); 43 | } 44 | // End UDialogueGraphNode_Base interface 45 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// 46 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/DialogueGraphNode_Root.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "CoreTypes.h" 5 | 6 | #include "DialogueGraphNode.h" 7 | 8 | #include "DialogueGraphNode_Root.generated.h" 9 | 10 | 11 | UCLASS() 12 | class DLGSYSTEMEDITOR_API UDialogueGraphNode_Root : public UDialogueGraphNode 13 | { 14 | GENERATED_BODY() 15 | 16 | public: 17 | // Begin UEdGraphNode interface 18 | /** Gets the name of this node, shown in title bar */ 19 | FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; 20 | 21 | /** Gets the tooltip to display when over the node */ 22 | FText GetTooltipText() const override 23 | { 24 | return NSLOCTEXT("DialogueGraphNode_Root", "RootToolTip", "The root start node of this graph"); 25 | } 26 | 27 | /** Called when the connection list of one of the pins of this node is changed in the editor */ 28 | void PinConnectionListChanged(UEdGraphPin* Pin) override; 29 | 30 | // Begin UDialogueGraphNode interface 31 | bool IsRootNode() const override { return true; } 32 | 33 | /** Sets the Dialogue node index number, this represents the index from the DlgDialogue.Nodes Array */ 34 | void SetDialogueNodeIndex(int32 InIndex) override { NodeIndex = INDEX_NONE; } 35 | 36 | /** Gets the Dialogue node index number for the DlgDialogue.Nodes Array */ 37 | int32 GetDialogueNodeIndex() const override { return INDEX_NONE; } 38 | 39 | /** Gets the background color of this node. */ 40 | FLinearColor GetNodeBackgroundColor() const override { return GetDefault()->RootNodeColor; } 41 | 42 | protected: 43 | // Begin UDialogueGraphNode interface 44 | /** This function is called after one of the properties of the Dialogue are changed. */ 45 | void OnDialoguePropertyChanged(const FPropertyChangedEvent& PropertyChangedEvent) override; 46 | }; 47 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/SDlgGraphNode_Root.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "SDlgGraphNode_Root.h" 3 | 4 | #include "DialogueGraphNode_Root.h" 5 | 6 | void SDlgGraphNode_Root::Construct(const FArguments& InArgs, UDialogueGraphNode_Root* InNode) 7 | { 8 | Super::Construct(Super::FArguments(), InNode); 9 | DialogueGraphNode_Root = InNode; 10 | } 11 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/SDlgGraphNode_Root.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Widgets/DeclarativeSyntaxSupport.h" 5 | 6 | #include "SDlgGraphNode.h" 7 | 8 | class UDialogueGraphNode_Root; 9 | 10 | /** 11 | * Widget for UDialogueGraphNode_Root 12 | */ 13 | class DLGSYSTEMEDITOR_API SDlgGraphNode_Root : public SDlgGraphNode 14 | { 15 | typedef SDlgGraphNode Super; 16 | public: 17 | 18 | SLATE_BEGIN_ARGS(SDlgGraphNode_Root) {} 19 | SLATE_END_ARGS() 20 | 21 | void Construct(const FArguments& InArgs, UDialogueGraphNode_Root* InNode); 22 | private: 23 | // The dialogue root this view represents 24 | UDialogueGraphNode_Root* DialogueGraphNode_Root = nullptr; 25 | }; 26 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/SDlgNodeOverlayWidget.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "SDlgNodeOverlayWidget.h" 3 | 4 | #include "Widgets/SOverlay.h" 5 | #include "Widgets/Layout/SBox.h" 6 | #include "Widgets/Layout/SBorder.h" 7 | 8 | #include "DlgSystemEditor/DlgStyle.h" 9 | 10 | ///////////////////////////////////////////////////// 11 | // SDlgNodeOverlayWidget 12 | void SDlgNodeOverlayWidget::Construct(const FArguments& InArgs) 13 | { 14 | OnHoverStateChangedEvent = InArgs._OnHoverStateChanged; 15 | OnGetBackgroundColorEvent = InArgs._OnGetBackgroundColor; 16 | OverlayBody = InArgs._OverlayBody.Get(); 17 | 18 | const FSlateBrush* CircleBrush = FDlgStyle::Get()->GetBrush(FDlgStyle::PROPERTY_GraphNodeCircleBox); 19 | ChildSlot 20 | [ 21 | SNew(SOverlay) 22 | +SOverlay::Slot() 23 | .HAlign(HAlign_Fill) 24 | .VAlign(VAlign_Fill) 25 | [ 26 | // Add a dummy box here to make sure the widget doesnt get smaller than the brush 27 | SNew(SBox) 28 | .WidthOverride(CircleBrush->ImageSize.X) 29 | .HeightOverride(CircleBrush->ImageSize.Y) 30 | ] 31 | 32 | +SOverlay::Slot() 33 | .HAlign(HAlign_Fill) 34 | .VAlign(VAlign_Fill) 35 | [ 36 | SNew(SBorder) 37 | .BorderImage(CircleBrush) 38 | .BorderBackgroundColor(this, &Self::GetBackgroundColor) 39 | .Padding(FMargin(4.0f)) 40 | .VAlign(VAlign_Center) 41 | .HAlign(HAlign_Center) 42 | [ 43 | OverlayBody.ToSharedRef() 44 | ] 45 | ] 46 | ]; 47 | } 48 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/Nodes/SDlgNodeOverlayWidget.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Widgets/DeclarativeSyntaxSupport.h" 5 | #include "Widgets/SCompoundWidget.h" 6 | 7 | /** Widget for overlaying another widget besides the node */ 8 | class DLGSYSTEMEDITOR_API SDlgNodeOverlayWidget : public SCompoundWidget 9 | { 10 | typedef SDlgNodeOverlayWidget Self; 11 | 12 | public: 13 | /** Delegate event fired when the hover state of this widget changes */ 14 | DECLARE_DELEGATE_OneParam(FOnHoverStateChanged, bool /* bHovered */); 15 | 16 | /** Delegate used to receive the background color of the node, depending on hover state and state of other siblings */ 17 | DECLARE_DELEGATE_RetVal_OneParam(FSlateColor, FOnGetBackgroundColor, bool /* bHovered */); 18 | 19 | SLATE_BEGIN_ARGS(SDlgNodeOverlayWidget) {} 20 | SLATE_ATTRIBUTE(TSharedPtr, OverlayBody) 21 | 22 | // Events 23 | SLATE_EVENT(FOnHoverStateChanged, OnHoverStateChanged) 24 | SLATE_EVENT(FOnGetBackgroundColor, OnGetBackgroundColor) 25 | SLATE_END_ARGS() 26 | 27 | void Construct(const FArguments& InArgs); 28 | 29 | void OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override 30 | { 31 | OnHoverStateChangedEvent.ExecuteIfBound(true); 32 | SCompoundWidget::OnMouseEnter(MyGeometry, MouseEvent); 33 | } 34 | 35 | void OnMouseLeave(const FPointerEvent& MouseEvent) override 36 | { 37 | OnHoverStateChangedEvent.ExecuteIfBound(false); 38 | SCompoundWidget::OnMouseLeave(MouseEvent); 39 | } 40 | 41 | /** Get the color we use to display the rounded border */ 42 | FSlateColor GetBackgroundColor() const 43 | { 44 | if (OnGetBackgroundColorEvent.IsBound()) 45 | return OnGetBackgroundColorEvent.Execute(IsHovered()); 46 | 47 | return FSlateColor::UseForeground(); 48 | } 49 | 50 | private: 51 | /** Delegate event fired when the hover state of this widget changes */ 52 | FOnHoverStateChanged OnHoverStateChangedEvent; 53 | 54 | /** Delegate used to receive the color of the node, depending on hover state and state of other siblings */ 55 | FOnGetBackgroundColor OnGetBackgroundColorEvent; 56 | 57 | /** The OverlayBody used for this widget*/ 58 | TSharedPtr OverlayBody; 59 | }; 60 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/SDlgDialogueActionMenu.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Widgets/DeclarativeSyntaxSupport.h" 5 | #include "SGraphPalette.h" 6 | #include "GraphEditor.h" 7 | #include "SGraphActionMenu.h" 8 | #include "Widgets/Input/SEditableTextBox.h" 9 | 10 | ////////////////////////////////////////////////////////////////////////// 11 | /** 12 | * Widget that appears after right clicking on the graph 13 | */ 14 | class DLGSYSTEMEDITOR_API SDlgDialogueActionMenu : public SBorder 15 | { 16 | typedef SDlgDialogueActionMenu Self; 17 | public: 18 | /** Delegate for the OnCloseReason event which is always raised when the SDlgDialogueActionMenu closes */ 19 | DECLARE_DELEGATE_TwoParams(FDialogueActionMenuClosedReason, bool /*bActionExecuted*/, bool /*bGraphPinContext*/); 20 | 21 | SLATE_BEGIN_ARGS(Self) 22 | : _Graph(nullptr) 23 | , _NewNodePosition(FVector2D::ZeroVector) 24 | , _AutoExpandActionMenu(true) 25 | {} 26 | 27 | SLATE_ARGUMENT(UEdGraph*, Graph) 28 | SLATE_ARGUMENT(FVector2D, NewNodePosition) 29 | SLATE_ARGUMENT(TArray, DraggedFromPins) 30 | SLATE_ARGUMENT(SGraphEditor::FActionMenuClosed, OnClosedCallback) 31 | SLATE_ARGUMENT(bool, AutoExpandActionMenu) 32 | SLATE_EVENT(FDialogueActionMenuClosedReason, OnCloseReason) 33 | SLATE_END_ARGS() 34 | 35 | void Construct(const FArguments& InArgs); 36 | ~SDlgDialogueActionMenu(); 37 | 38 | TSharedPtr GetFilterTextBox() const { return GraphActionMenu->GetFilterTextBox(); } 39 | 40 | protected: 41 | void OnActionSelected(const TArray>& SelectedAction, ESelectInfo::Type InSelectionType); 42 | 43 | /** Callback used to populate all actions list in SGraphActionMenu */ 44 | void CollectAllActions(FGraphActionListBuilderBase& OutAllActions); 45 | 46 | protected: 47 | UEdGraph* Graph = nullptr; 48 | 49 | /** The pins this node was dragged from. */ 50 | TArray DraggedFromPins; 51 | 52 | /** The position of this new node */ 53 | FVector2D NewNodePosition; 54 | 55 | /** Should expand the new menu? */ 56 | bool AutoExpandActionMenu = true; 57 | 58 | /** Was an action executed? */ 59 | bool bActionExecuted = false; 60 | 61 | // Events for close 62 | SGraphEditor::FActionMenuClosed OnClosedCallback; 63 | FDialogueActionMenuClosedReason OnCloseReasonCallback; 64 | 65 | // The actual menu 66 | TSharedPtr GraphActionMenu; 67 | }; 68 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/SDlgEditorPalette.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "SDlgEditorPalette.h" 3 | 4 | #include "DlgSystemEditor/Editor/Graph/DialogueGraphSchema.h" 5 | 6 | void SDlgEditorPalette::Construct(const FArguments& InArgs) 7 | { 8 | // Auto expand the palette as there's so few nodes 9 | SGraphPalette::Construct(SGraphPalette::FArguments().AutoExpandActionMenu(true)); 10 | } 11 | 12 | void SDlgEditorPalette::CollectAllActions(FGraphActionListBuilderBase& OutAllActions) 13 | { 14 | const UDialogueGraphSchema* Schema = GetDefault(); 15 | FGraphActionMenuBuilder ActionMenuBuilder; 16 | 17 | // Determine all possible actions 18 | Schema->GetPaletteActions(ActionMenuBuilder); 19 | OutAllActions.Append(ActionMenuBuilder); 20 | } 21 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Editor/SDlgEditorPalette.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Widgets/DeclarativeSyntaxSupport.h" 5 | #include "SGraphPalette.h" 6 | 7 | ////////////////////////////////////////////////////////////////////////// 8 | 9 | class DLGSYSTEMEDITOR_API SDlgEditorPalette : public SGraphPalette 10 | { 11 | public: 12 | SLATE_BEGIN_ARGS(SDlgEditorPalette) {} 13 | SLATE_END_ARGS() 14 | 15 | void Construct(const FArguments& InArgs); 16 | 17 | protected: 18 | /** Callback used to populate all actions list in SGraphActionMenu */ 19 | void CollectAllActions(FGraphActionListBuilderBase& OutAllActions) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgAssetFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgAssetFactory.h" 3 | 4 | #include "DlgSystem/DlgDialogue.h" 5 | 6 | #define LOCTEXT_NAMESPACE "DlgSystem" 7 | 8 | ///////////////////////////////////////////////////// 9 | // UDlgAssetFactory 10 | UDlgAssetFactory::UDlgAssetFactory(const FObjectInitializer& ObjectInitializer) 11 | : Super(ObjectInitializer) 12 | { 13 | bCreateNew = true; 14 | 15 | // true if the associated editor should be opened after creating a new object. 16 | bEditAfterNew = true; 17 | SupportedClass = UDlgDialogue::StaticClass(); 18 | } 19 | 20 | UObject* UDlgAssetFactory::FactoryCreateNew( 21 | UClass* Class, 22 | UObject* InParent, 23 | FName Name, 24 | EObjectFlags Flags, 25 | UObject* Context, 26 | FFeedbackContext* Warn 27 | ) 28 | { 29 | UDlgDialogue* NewDialogue = NewObject(InParent, Class, Name, Flags | RF_Transactional); 30 | return NewDialogue; 31 | } 32 | 33 | #undef LOCTEXT_NAMESPACE 34 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgAssetFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Factories/Factory.h" 5 | 6 | #include "DlgAssetFactory.generated.h" 7 | 8 | /** 9 | * Factory for dialogues. Editor does the magic here, without this class, 10 | * you won't have the right click "Dialog System" -> "Dialogue" 11 | */ 12 | UCLASS() 13 | class DLGSYSTEMEDITOR_API UDlgAssetFactory : public UFactory 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UDlgAssetFactory(const FObjectInitializer& ObjectInitializer); 19 | 20 | // 21 | // UFactory interface 22 | // 23 | UObject* FactoryCreateNew( 24 | UClass* Class, 25 | UObject* InParent, 26 | FName Name, 27 | EObjectFlags Flags, 28 | UObject* Context, 29 | FFeedbackContext* Warn 30 | ) override; 31 | }; 32 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgClassViewerFilters.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "ClassViewerFilter.h" 5 | 6 | 7 | // Filter used in the class picker to only show non abstract children of class 8 | class DLGSYSTEMEDITOR_API FDlgChildrenOfClassFilterViewer : public IClassViewerFilter 9 | { 10 | public: 11 | // All children of these classes will be included unless filtered out by another setting. 12 | TSet AllowedChildrenOfClasses; 13 | 14 | bool IsClassAllowed(const FClassViewerInitializationOptions& InInitOptions, const UClass* InClass, 15 | TSharedRef InFilterFuncs) override 16 | { 17 | return !InClass->HasAnyClassFlags(DisallowedClassFlags) 18 | && InFilterFuncs->IfInChildOfClassesSet(AllowedChildrenOfClasses, InClass) != EFilterReturn::Failed; 19 | } 20 | 21 | bool IsUnloadedClassAllowed(const FClassViewerInitializationOptions& InInitOptions, 22 | const TSharedRef InUnloadedClassData, 23 | TSharedRef< FClassViewerFilterFuncs > InFilterFuncs) override 24 | { 25 | return !InUnloadedClassData->HasAnyClassFlags(DisallowedClassFlags) 26 | && InFilterFuncs->IfInChildOfClassesSet(AllowedChildrenOfClasses, InUnloadedClassData) != EFilterReturn::Failed; 27 | } 28 | 29 | private: 30 | // Disallowed class flags. 31 | EClassFlags DisallowedClassFlags = CLASS_Deprecated; 32 | }; 33 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgConditionCustomFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgConditionCustomFactory.h" 3 | 4 | #include "DlgSystemEditor/DlgEditorUtilities.h" 5 | #include "DlgSystem/DlgConditionCustom.h" 6 | #include "Kismet2/KismetEditorUtilities.h" 7 | #include "Misc/MessageDialog.h" 8 | 9 | #define LOCTEXT_NAMESPACE "DlgSystem" 10 | 11 | ///////////////////////////////////////////////////// 12 | // UDlgConditionCustomFactory 13 | UDlgConditionCustomFactory::UDlgConditionCustomFactory(const FObjectInitializer& ObjectInitializer) 14 | : Super(ObjectInitializer) 15 | { 16 | bCreateNew = true; 17 | 18 | // true if the associated editor should be opened after creating a new object. 19 | bEditAfterNew = false; 20 | SupportedClass = UDlgConditionCustom::StaticClass(); 21 | 22 | // Default class 23 | ParentClass = SupportedClass; 24 | } 25 | 26 | bool UDlgConditionCustomFactory::ConfigureProperties() 27 | { 28 | static const FText TitleText = FText::FromString(TEXT("Pick Parent Class for Custom Condition")); 29 | ParentClass = nullptr; 30 | 31 | UClass* ChosenClass = nullptr; 32 | const bool bPressedOk = FDlgEditorUtilities::PickChildrenOfClass(TitleText, ChosenClass, SupportedClass); 33 | if (bPressedOk) 34 | { 35 | ParentClass = ChosenClass; 36 | } 37 | 38 | return bPressedOk; 39 | } 40 | 41 | UObject* UDlgConditionCustomFactory::FactoryCreateNew( 42 | UClass* Class, 43 | UObject* InParent, 44 | FName Name, 45 | EObjectFlags Flags, 46 | UObject* Context, 47 | FFeedbackContext* Warn 48 | ) 49 | { 50 | // Something wrong happened 51 | if (ParentClass == nullptr || !FKismetEditorUtilities::CanCreateBlueprintOfClass(ParentClass)) 52 | { 53 | FFormatNamedArguments Args; 54 | Args.Add(TEXT("ClassName"), ParentClass ? FText::FromString(ParentClass->GetName()) : NSLOCTEXT("UnrealEd", "Null", "(null)")); 55 | FMessageDialog::Open(EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "CannotCreateBlueprintFromClass", "Cannot create a blueprint based on the class '{0}'."), Args)); 56 | return nullptr; 57 | } 58 | 59 | // Create 60 | return FKismetEditorUtilities::CreateBlueprint( 61 | ParentClass, 62 | InParent, 63 | Name, 64 | BPTYPE_Normal, 65 | UBlueprint::StaticClass(), 66 | UBlueprintGeneratedClass::StaticClass(), 67 | NAME_None 68 | ); 69 | } 70 | 71 | #undef LOCTEXT_NAMESPACE 72 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgConditionCustomFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Factories/Factory.h" 5 | 6 | #include "DlgConditionCustomFactory.generated.h" 7 | 8 | class UDlgConditionCustom; 9 | 10 | UCLASS() 11 | class DLGSYSTEMEDITOR_API UDlgConditionCustomFactory : public UFactory 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | UDlgConditionCustomFactory(const FObjectInitializer& ObjectInitializer); 17 | 18 | // 19 | // UFactory interface 20 | // 21 | 22 | bool ConfigureProperties() override; 23 | UObject* FactoryCreateNew( 24 | UClass* Class, 25 | UObject* InParent, 26 | FName Name, 27 | EObjectFlags Flags, 28 | UObject* Context, 29 | FFeedbackContext* Warn 30 | ) override; 31 | 32 | private: 33 | // Holds the template of the class we are building 34 | UPROPERTY() 35 | TSubclassOf ParentClass; 36 | }; 37 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgEventCustomFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgEventCustomFactory.h" 3 | 4 | #include "DlgSystemEditor/DlgEditorUtilities.h" 5 | #include "DlgSystem/DlgEventCustom.h" 6 | #include "Kismet2/KismetEditorUtilities.h" 7 | #include "Misc/MessageDialog.h" 8 | 9 | #define LOCTEXT_NAMESPACE "DlgSystem" 10 | 11 | ///////////////////////////////////////////////////// 12 | // UDlgEventCustomFactory 13 | UDlgEventCustomFactory::UDlgEventCustomFactory(const FObjectInitializer& ObjectInitializer) 14 | : Super(ObjectInitializer) 15 | { 16 | bCreateNew = true; 17 | 18 | // true if the associated editor should be opened after creating a new object. 19 | bEditAfterNew = false; 20 | SupportedClass = UDlgEventCustom::StaticClass(); 21 | 22 | // Default class 23 | ParentClass = SupportedClass; 24 | } 25 | 26 | bool UDlgEventCustomFactory::ConfigureProperties() 27 | { 28 | static const FText TitleText = FText::FromString(TEXT("Pick Parent Class for Custom Event")); 29 | ParentClass = nullptr; 30 | 31 | UClass* ChosenClass = nullptr; 32 | const bool bPressedOk = FDlgEditorUtilities::PickChildrenOfClass(TitleText, ChosenClass, SupportedClass); 33 | if (bPressedOk) 34 | { 35 | ParentClass = ChosenClass; 36 | } 37 | 38 | return bPressedOk; 39 | } 40 | 41 | UObject* UDlgEventCustomFactory::FactoryCreateNew( 42 | UClass* Class, 43 | UObject* InParent, 44 | FName Name, 45 | EObjectFlags Flags, 46 | UObject* Context, 47 | FFeedbackContext* Warn 48 | ) 49 | { 50 | // Something wrong happened 51 | if (ParentClass == nullptr || !FKismetEditorUtilities::CanCreateBlueprintOfClass(ParentClass)) 52 | { 53 | FFormatNamedArguments Args; 54 | Args.Add(TEXT("ClassName"), ParentClass ? FText::FromString(ParentClass->GetName()) : NSLOCTEXT("UnrealEd", "Null", "(null)")); 55 | FMessageDialog::Open(EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "CannotCreateBlueprintFromClass", "Cannot create a blueprint based on the class '{0}'."), Args)); 56 | return nullptr; 57 | } 58 | 59 | // Create 60 | return FKismetEditorUtilities::CreateBlueprint( 61 | ParentClass, 62 | InParent, 63 | Name, 64 | BPTYPE_Normal, 65 | UBlueprint::StaticClass(), 66 | UBlueprintGeneratedClass::StaticClass(), 67 | NAME_None 68 | ); 69 | } 70 | 71 | #undef LOCTEXT_NAMESPACE 72 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgEventCustomFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Factories/Factory.h" 5 | 6 | #include "DlgEventCustomFactory.generated.h" 7 | 8 | class UDlgEventCustom; 9 | 10 | UCLASS() 11 | class DLGSYSTEMEDITOR_API UDlgEventCustomFactory : public UFactory 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | UDlgEventCustomFactory(const FObjectInitializer& ObjectInitializer); 17 | 18 | // 19 | // UFactory interface 20 | // 21 | 22 | bool ConfigureProperties() override; 23 | UObject* FactoryCreateNew( 24 | UClass* Class, 25 | UObject* InParent, 26 | FName Name, 27 | EObjectFlags Flags, 28 | UObject* Context, 29 | FFeedbackContext* Warn 30 | ) override; 31 | 32 | private: 33 | // Holds the template of the class we are building 34 | UPROPERTY() 35 | TSubclassOf ParentClass; 36 | }; 37 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgGraphFactories.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgGraphFactories.h" 3 | 4 | #include "K2Node.h" 5 | 6 | #include "DlgSystemEditor/Editor/Nodes/DialogueGraphNode_Base.h" 7 | #include "DlgSystemEditor/Editor/Nodes/DialogueGraphNode_Edge.h" 8 | #include "DlgSystemEditor/Editor/Nodes/DialogueGraphNode_Root.h" 9 | #include "DlgSystemEditor/Editor/Nodes/SDlgGraphNode.h" 10 | #include "DlgSystemEditor/Editor/Nodes/SDlgGraphNode_Root.h" 11 | #include "DlgSystemEditor/Editor/Nodes/SDlgGraphNode_Edge.h" 12 | #include "DlgSystemEditor/Editor/Nodes/SDlgGraphPin.h" 13 | #include "DlgSystemEditor/BlueprintNodes/DialogueK2Node_Select.h" 14 | #include "DlgSystemEditor/BlueprintNodes/SGraphNode_DialogueK2Select.h" 15 | #include "DlgSystemEditor/BlueprintNodes/SGraphNode_DialogueK2Switch.h" 16 | #include "DlgSystemEditor/BlueprintNodes/DialogueK2Node_SwitchDialogueCallback.h" 17 | 18 | TSharedPtr FDlgGraphNodeFactory::CreateNode(class UEdGraphNode* InNode) const 19 | { 20 | // Dialogue Editor Nodes 21 | if (UDialogueGraphNode_Base* DialogueNode_Base = Cast(InNode)) 22 | { 23 | // Nodes 24 | if (UDialogueGraphNode* DialogueNode = Cast(DialogueNode_Base)) 25 | { 26 | if (UDialogueGraphNode_Root* DialogueStartNode = Cast(DialogueNode)) 27 | { 28 | return SNew(SDlgGraphNode_Root, DialogueStartNode); 29 | } 30 | 31 | return SNew(SDlgGraphNode, DialogueNode); 32 | } 33 | 34 | // Edge 35 | if (UDialogueGraphNode_Edge* DialogueEdge = Cast(DialogueNode_Base)) 36 | { 37 | return SNew(SDlgGraphNode_Edge, DialogueEdge); 38 | } 39 | } 40 | 41 | // Blueprint Editor Nodes 42 | if (UK2Node* BlueprintNode_Base = Cast(InNode)) 43 | { 44 | if (UDialogueK2Node_Select* BlueprintDialogueSelectNode = Cast(BlueprintNode_Base)) 45 | { 46 | return SNew(SGraphNode_DialogueK2Select, BlueprintDialogueSelectNode); 47 | } 48 | 49 | if (UDialogueK2Node_SwitchDialogueCallback* BlueprintDialogueSwitchNode = Cast(BlueprintNode_Base)) 50 | { 51 | return SNew(SGraphNode_DialogueK2Switch, BlueprintDialogueSwitchNode); 52 | } 53 | } 54 | 55 | return nullptr; 56 | } 57 | 58 | TSharedPtr FDlgGraphPinFactory::CreatePin(class UEdGraphPin* Pin) const 59 | { 60 | if (Pin->GetSchema()->IsA()) 61 | { 62 | return SNew(SDlgGraphPin, Pin); 63 | } 64 | 65 | return nullptr; 66 | } 67 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgGraphFactories.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "EdGraphUtilities.h" 5 | 6 | // Factory for creating Dialogue graph nodes 7 | // WARNING: UEdGraphNode::CreateVisualWidget has priority over this, see FNodeFactory::CreateNodeWidget 8 | struct DLGSYSTEMEDITOR_API FDlgGraphNodeFactory : public FGraphPanelNodeFactory 9 | { 10 | TSharedPtr CreateNode(class UEdGraphNode* InNode) const override; 11 | }; 12 | 13 | // Factory for creating pin widgets 14 | // This is the highest priority creator, see FNodeFactory::CreatePinWidget 15 | struct DLGSYSTEMEDITOR_API FDlgGraphPinFactory : public FGraphPanelPinFactory 16 | { 17 | public: 18 | TSharedPtr CreatePin(class UEdGraphPin* Pin) const override; 19 | }; 20 | 21 | // Factory for creating the drawing policy between nodes. 22 | // Defined in UDialogueGraphSchema::CreateConnectionDrawingPolicy which has priority over FGraphPanelPinConnectionFactory, 23 | // see FNodeFactory::CreateConnectionPolicy 24 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgNodeDataFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgNodeDataFactory.h" 3 | 4 | 5 | #include "DlgSystemEditor/DlgEditorUtilities.h" 6 | #include "DlgSystem/DlgNodeData.h" 7 | #include "Kismet2/KismetEditorUtilities.h" 8 | #include "Misc/MessageDialog.h" 9 | 10 | #define LOCTEXT_NAMESPACE "DlgSystem" 11 | 12 | ///////////////////////////////////////////////////// 13 | // UDlgNodeDataFactory 14 | UDlgNodeDataFactory::UDlgNodeDataFactory(const FObjectInitializer& ObjectInitializer) 15 | : Super(ObjectInitializer) 16 | { 17 | bCreateNew = true; 18 | 19 | // true if the associated editor should be opened after creating a new object. 20 | bEditAfterNew = false; 21 | SupportedClass = UDlgNodeData::StaticClass(); 22 | 23 | // Default class 24 | ParentClass = SupportedClass; 25 | } 26 | 27 | bool UDlgNodeDataFactory::ConfigureProperties() 28 | { 29 | static const FText TitleText = FText::FromString(TEXT("Pick Parent Class for Node Data")); 30 | ParentClass = nullptr; 31 | 32 | UClass* ChosenClass = nullptr; 33 | const bool bPressedOk = FDlgEditorUtilities::PickChildrenOfClass(TitleText, ChosenClass, SupportedClass); 34 | if (bPressedOk) 35 | { 36 | ParentClass = ChosenClass; 37 | } 38 | 39 | return bPressedOk; 40 | } 41 | 42 | UObject* UDlgNodeDataFactory::FactoryCreateNew( 43 | UClass* Class, 44 | UObject* InParent, 45 | FName Name, 46 | EObjectFlags Flags, 47 | UObject* Context, 48 | FFeedbackContext* Warn 49 | ) 50 | { 51 | // Something wrong happened 52 | if (ParentClass == nullptr || !FKismetEditorUtilities::CanCreateBlueprintOfClass(ParentClass)) 53 | { 54 | FFormatNamedArguments Args; 55 | Args.Add(TEXT("ClassName"), ParentClass ? FText::FromString(ParentClass->GetName()) : NSLOCTEXT("UnrealEd", "Null", "(null)")); 56 | FMessageDialog::Open(EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "CannotCreateBlueprintFromClass", "Cannot create a blueprint based on the class '{0}'."), Args)); 57 | return nullptr; 58 | } 59 | 60 | // Create 61 | return FKismetEditorUtilities::CreateBlueprint( 62 | ParentClass, 63 | InParent, 64 | Name, 65 | BPTYPE_Normal, 66 | UBlueprint::StaticClass(), 67 | UBlueprintGeneratedClass::StaticClass(), 68 | NAME_None 69 | ); 70 | } 71 | 72 | #undef LOCTEXT_NAMESPACE 73 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgNodeDataFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Factories/Factory.h" 5 | 6 | #include "DlgNodeDataFactory.generated.h" 7 | 8 | class UDlgNodeData; 9 | 10 | UCLASS() 11 | class DLGSYSTEMEDITOR_API UDlgNodeDataFactory : public UFactory 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | UDlgNodeDataFactory(const FObjectInitializer& ObjectInitializer); 17 | 18 | // 19 | // UFactory interface 20 | // 21 | 22 | bool ConfigureProperties() override; 23 | UObject* FactoryCreateNew( 24 | UClass* Class, 25 | UObject* InParent, 26 | FName Name, 27 | EObjectFlags Flags, 28 | UObject* Context, 29 | FFeedbackContext* Warn 30 | ) override; 31 | 32 | private: 33 | // Holds the template of the class we are building 34 | UPROPERTY() 35 | TSubclassOf ParentClass; 36 | }; 37 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgTextArgumentCustomFactory.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #include "DlgTextArgumentCustomFactory.h" 3 | 4 | 5 | #include "DlgSystemEditor/DlgEditorUtilities.h" 6 | #include "DlgSystem/DlgTextArgumentCustom.h" 7 | #include "Kismet2/KismetEditorUtilities.h" 8 | #include "Misc/MessageDialog.h" 9 | 10 | #define LOCTEXT_NAMESPACE "DlgSystem" 11 | 12 | ///////////////////////////////////////////////////// 13 | // UDlgConditionCustomFactory 14 | UDlgTextArgumentCustomFactory::UDlgTextArgumentCustomFactory(const FObjectInitializer& ObjectInitializer) 15 | : Super(ObjectInitializer) 16 | { 17 | bCreateNew = true; 18 | 19 | // true if the associated editor should be opened after creating a new object. 20 | bEditAfterNew = false; 21 | SupportedClass = UDlgTextArgumentCustom::StaticClass(); 22 | 23 | // Default class 24 | ParentClass = SupportedClass; 25 | } 26 | 27 | bool UDlgTextArgumentCustomFactory::ConfigureProperties() 28 | { 29 | static const FText TitleText = FText::FromString(TEXT("Pick Parent Class for Custom Text Argument")); 30 | ParentClass = nullptr; 31 | 32 | UClass* ChosenClass = nullptr; 33 | const bool bPressedOk = FDlgEditorUtilities::PickChildrenOfClass(TitleText, ChosenClass, SupportedClass); 34 | if (bPressedOk) 35 | { 36 | ParentClass = ChosenClass; 37 | } 38 | 39 | return bPressedOk; 40 | } 41 | 42 | UObject* UDlgTextArgumentCustomFactory::FactoryCreateNew( 43 | UClass* Class, 44 | UObject* InParent, 45 | FName Name, 46 | EObjectFlags Flags, 47 | UObject* Context, 48 | FFeedbackContext* Warn 49 | ) 50 | { 51 | // Something wrong happened 52 | if (ParentClass == nullptr || !FKismetEditorUtilities::CanCreateBlueprintOfClass(ParentClass)) 53 | { 54 | FFormatNamedArguments Args; 55 | Args.Add(TEXT("ClassName"), ParentClass ? FText::FromString(ParentClass->GetName()) : NSLOCTEXT("UnrealEd", "Null", "(null)")); 56 | FMessageDialog::Open(EAppMsgType::Ok, FText::Format(NSLOCTEXT("UnrealEd", "CannotCreateBlueprintFromClass", "Cannot create a blueprint based on the class '{0}'."), Args)); 57 | return nullptr; 58 | } 59 | 60 | // Create 61 | return FKismetEditorUtilities::CreateBlueprint( 62 | ParentClass, 63 | InParent, 64 | Name, 65 | BPTYPE_Normal, 66 | UBlueprint::StaticClass(), 67 | UBlueprintGeneratedClass::StaticClass(), 68 | NAME_None 69 | ); 70 | } 71 | 72 | #undef LOCTEXT_NAMESPACE 73 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/Factories/DlgTextArgumentCustomFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "Factories/Factory.h" 5 | 6 | #include "DlgTextArgumentCustomFactory.generated.h" 7 | 8 | class UDlgTextArgumentCustom; 9 | 10 | UCLASS() 11 | class DLGSYSTEMEDITOR_API UDlgTextArgumentCustomFactory : public UFactory 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | UDlgTextArgumentCustomFactory(const FObjectInitializer& ObjectInitializer); 17 | 18 | // 19 | // UFactory interface 20 | // 21 | 22 | bool ConfigureProperties() override; 23 | UObject* FactoryCreateNew( 24 | UClass* Class, 25 | UObject* InParent, 26 | FName Name, 27 | EObjectFlags Flags, 28 | UObject* Context, 29 | FFeedbackContext* Warn 30 | ) override; 31 | 32 | private: 33 | // Holds the template of the class we are building 34 | UPROPERTY() 35 | TSubclassOf ParentClass; 36 | }; 37 | -------------------------------------------------------------------------------- /Plugins/DlgSystem/Source/DlgSystemEditor/IDlgSystemEditorModule.h: -------------------------------------------------------------------------------- 1 | // Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "AssetTypeCategories.h" 5 | #include "Modules/ModuleManager.h" 6 | #include "Modules/ModuleInterface.h" 7 | 8 | // The name of the Dialogue System Editor plugin as defined in the .uplugin file 9 | const FName DIALOGUE_SYSTEM_EDITOR_PLUGIN_NAME(TEXT("DlgSystemEditor")); 10 | 11 | /** 12 | * Interface for the DlgSystemEditor module. 13 | */ 14 | class DLGSYSTEMEDITOR_API IDlgSystemEditorModule : public IModuleInterface 15 | { 16 | public: 17 | 18 | /** 19 | * Singleton-like access to this module's interface. This is just for convenience! 20 | * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. 21 | * 22 | * @return Returns singleton instance, loading the module on demand if needed 23 | */ 24 | static IDlgSystemEditorModule& Get() 25 | { 26 | return FModuleManager::LoadModuleChecked(DIALOGUE_SYSTEM_EDITOR_PLUGIN_NAME); 27 | } 28 | 29 | /** 30 | * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. 31 | * 32 | * @return True if the module is loaded and ready to use 33 | */ 34 | static bool IsAvailable() 35 | { 36 | return FModuleManager::Get().IsModuleLoaded(DIALOGUE_SYSTEM_EDITOR_PLUGIN_NAME); 37 | } 38 | 39 | // Returns the Asset Category for this plugin 40 | virtual EAssetTypeCategories::Type GetAssetCategory() const = 0; 41 | 42 | public: 43 | virtual ~IDlgSystemEditorModule() {} 44 | }; 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Not Yet: Dialogue Plugin System - Example Project 2 | 3 | Branch Unreal version: `5.2` 4 | 5 | Example project for the [DlgSystem](https://github.com/NotYetGames/DlgSystem/) plugin. 6 | 7 | **See the [Wiki](https://github.com/NotYetGames/DlgSystem/wiki) for the manual and tutorials.** 8 | 9 | #### ℹ️ NOTE: 📄 The Text Version step by step explanation of this [Project is here](https://github.com/NotYetGames/DlgSystem/wiki/Example-Tutorial-Blueprint) 10 | #### ℹ️ NOTE: 🎥 There is a video tutorial version [here in this playlist](https://bit.ly/DlgSystemVideoTutorials) 11 | 12 | 13 | ## Using 14 | 15 | ### 1. [Setup Visual Studio for Unreal Engine](https://docs.unrealengine.com/en-US/Programming/Development/VisualStudioSetup/index.html) 16 | 17 | 👉 [Visual Studio Install Link](https://visualstudio.microsoft.com/vs/) 18 | 19 | To add C++ tools to your VS installation, make sure you select **Game development with C++** under Workloads. 20 | 21 | ![Settings Installer for VS](/Docs/images/VS2017_SettingsInstaller.jpg) 22 | 23 | **NOTE:** If you HAVE the Dialogue plugin in the unreal marketplace and you want to use that, 24 | you can just delete the `Plugins` folder from the example project. 25 | 26 | 27 | ### 2. Download this example project 28 | ### 3. Unarchive it 29 | ### 4. Open the Project 30 | - Open the `NYDlgSystemExample.uproject` file 31 | - A popup like this will appear, press **Yes** 32 | 33 | ![Opening Project Missing Modules](/Docs/images/MissingModules.jpg) 34 | - If you have Visual Studio setup like in Step 1, this will finish successfully and the project will open 35 | 36 | ![Opening Project Missing Modules](/Docs/images/CompilingMissingModules.jpg) 37 | 38 | 39 | ## Clone 40 | 41 | ```sh 42 | git clone -b 5.2 https://github.com/NotYetGames/NotYetDlgSystemExample.git 43 | ``` 44 | 45 | ## Git commands 46 | ```sh 47 | # Update 48 | ./git-update.sh 49 | 50 | # Push subtree modifications 51 | # NOTE: This is only if you modified the Plugins/DlgSystem subtree. 52 | git subtree push --prefix=Plugins/DlgSystem https://github.com/NotYetGames/DlgSystem.git master 53 | 54 | # Was added with 55 | git subtree add --prefix Plugins/DlgSystem https://github.com/NotYetGames/DlgSystem.git master --squash 56 | ``` 57 | -------------------------------------------------------------------------------- /git-update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" 4 | 5 | # Update repo 6 | git pull --verbose 7 | 8 | # Update subtree 9 | git subtree pull \ 10 | --prefix Plugins/DlgSystem https://github.com/NotYetGames/DlgSystem.git master \ 11 | --squash --message "Update Dialogue Plugin" 12 | --------------------------------------------------------------------------------