2025-08-31 15:14:48 +08:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "ProjectFish/DataAsset/BagConfigAsset.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
class PROJECTFISHEDITOR_API SBagConfigEditorWidget: public SCompoundWidget
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SBagConfigEditorWidget) {}
|
|
|
|
|
SLATE_ARGUMENT(UBagConfigAsset*, BagConfigAsset)
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
|
|
|
|
|
|
// // 设置要编辑的背包类
|
|
|
|
|
// void UpdateBagConfig(UBagConfigAsset* InBagConfig);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
TWeakObjectPtr<UBagConfigAsset> BagConfig;
|
|
|
|
|
|
|
|
|
|
// 当前选中的技能对象
|
|
|
|
|
TWeakObjectPtr<class USkillAsset> SelectedSkillAsset;
|
|
|
|
|
|
|
|
|
|
// 是否处于放置模式
|
|
|
|
|
bool bIsPlacingSkill;
|
|
|
|
|
|
|
|
|
|
// 选中的技能索引
|
|
|
|
|
int32 SelectedSkillIndex;
|
|
|
|
|
|
|
|
|
|
// UI组件
|
2025-08-31 15:36:48 +08:00
|
|
|
TSharedPtr<class SBagConfigGridWidget> BagGridWidget;
|
2025-08-31 15:59:08 +08:00
|
|
|
TSharedPtr<class SSkillListWidget> SkillListWidget;
|
2025-08-31 15:14:48 +08:00
|
|
|
|
2025-08-31 15:36:48 +08:00
|
|
|
// 回调函数
|
|
|
|
|
FReply OnAddSkillClicked();
|
|
|
|
|
FReply OnRemoveSkillClicked();
|
|
|
|
|
FReply OnClearAllSkillsClicked();
|
2025-08-31 15:14:48 +08:00
|
|
|
|
|
|
|
|
// BagShapeAsset选择回调
|
|
|
|
|
void OnBagShapeAssetChanged(const FAssetData& AssetData);
|
|
|
|
|
|
|
|
|
|
// 技能选择回调
|
|
|
|
|
void OnSkillAssetChanged(const FAssetData& AssetData);
|
|
|
|
|
|
2025-08-31 15:59:08 +08:00
|
|
|
// 技能选择回调
|
|
|
|
|
void OnSkillSelected(int32 SkillIndex);
|
|
|
|
|
|
2025-08-31 15:36:48 +08:00
|
|
|
// 格子点击回调
|
|
|
|
|
void OnGridCellClicked(int32 X, int32 Y);
|
2025-08-31 15:14:48 +08:00
|
|
|
|
|
|
|
|
// 刷新UI
|
|
|
|
|
void RefreshUI();
|
|
|
|
|
|
|
|
|
|
// 显示警告消息
|
|
|
|
|
void ShowWarningMessage(const FString& Message);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2025-08-31 15:36:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-31 15:59:08 +08:00
|
|
|
|
|
|
|
|
|