更新 Source/FLESHEditor/Public/DismembermentGraph/DismembermentGraphPalette.h
This commit is contained in:
@@ -30,6 +30,7 @@ struct FDismembermentGraphNodeCategory
|
||||
|
||||
/**
|
||||
* Node palette widget for the dismemberment graph editor
|
||||
* This is a stub class that will be implemented later
|
||||
*/
|
||||
class FLESHEDITOR_API SDismembermentGraphPalette : public SCompoundWidget
|
||||
{
|
||||
@@ -37,48 +38,19 @@ public:
|
||||
SLATE_BEGIN_ARGS(SDismembermentGraphPalette) {}
|
||||
SLATE_END_ARGS()
|
||||
|
||||
void Construct(const FArguments& InArgs, TSharedPtr<FDismembermentGraphEditor> InGraphEditor);
|
||||
void Construct(const FArguments& InArgs, TSharedPtr<FDismembermentGraphEditor> InGraphEditor)
|
||||
{
|
||||
GraphEditor = InGraphEditor;
|
||||
|
||||
// Create a simple placeholder widget
|
||||
ChildSlot
|
||||
[
|
||||
SNew(STextBlock)
|
||||
.Text(FText::FromString("Dismemberment Graph Palette - Coming Soon"))
|
||||
];
|
||||
}
|
||||
|
||||
private:
|
||||
// The graph editor that owns this palette
|
||||
TWeakPtr<FDismembermentGraphEditor> GraphEditor;
|
||||
|
||||
// Root categories
|
||||
TArray<TSharedPtr<FDismembermentGraphNodeCategory>> RootCategories;
|
||||
|
||||
// Tree view widget
|
||||
TSharedPtr<STreeView<TSharedPtr<FDismembermentGraphNodeCategory>>> CategoriesTreeView;
|
||||
|
||||
// Search box widget
|
||||
TSharedPtr<class SSearchBox> SearchBox;
|
||||
|
||||
// Search filter
|
||||
TSharedPtr<class FDismembermentGraphNodeSearchFilter> SearchFilter;
|
||||
|
||||
// Initialize the palette
|
||||
void InitializePalette();
|
||||
|
||||
// Create a category tree item
|
||||
TSharedRef<ITableRow> OnGenerateCategoryRow(TSharedPtr<FDismembermentGraphNodeCategory> Category, const TSharedRef<STableViewBase>& OwnerTable);
|
||||
|
||||
// Get child categories
|
||||
void OnGetCategoryChildren(TSharedPtr<FDismembermentGraphNodeCategory> Category, TArray<TSharedPtr<FDismembermentGraphNodeCategory>>& OutChildren);
|
||||
|
||||
// Category is expanded
|
||||
void OnCategoryExpansionChanged(TSharedPtr<FDismembermentGraphNodeCategory> Category, bool bExpanded);
|
||||
|
||||
// Search text changed
|
||||
void OnSearchTextChanged(const FText& InFilterText);
|
||||
|
||||
// Create a node from the palette
|
||||
FReply OnCreateNode(UClass* NodeClass, const FVector2D& ScreenPosition, const FVector2D& GraphPosition);
|
||||
|
||||
// Handle drag detected
|
||||
FReply OnDragDetected(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent, UClass* NodeClass);
|
||||
|
||||
// Create default categories
|
||||
void CreateDefaultCategories();
|
||||
|
||||
// Add a node class to the palette
|
||||
void AddNodeClassToCategory(UClass* NodeClass, const FText& CategoryName);
|
||||
};
|
||||
|
Reference in New Issue
Block a user