diff --git a/Content/Blueprint/HomeLand/Bp_HomeLandHud.uasset b/Content/Blueprint/HomeLand/Bp_HomeLandHud.uasset index 2ef9319..99b7938 100644 Binary files a/Content/Blueprint/HomeLand/Bp_HomeLandHud.uasset and b/Content/Blueprint/HomeLand/Bp_HomeLandHud.uasset differ diff --git a/Content/Data/BusyGameAsset.uasset b/Content/Data/BusyGameAsset.uasset index 736fc44..e2b9b18 100644 Binary files a/Content/Data/BusyGameAsset.uasset and b/Content/Data/BusyGameAsset.uasset differ diff --git a/Content/Data/Homeland/PreCookItemConfig.uasset b/Content/Data/Homeland/PreCookItemConfig.uasset new file mode 100644 index 0000000..59e872f Binary files /dev/null and b/Content/Data/Homeland/PreCookItemConfig.uasset differ diff --git a/Content/Lua/HomeLand/UI/Hearth/HearthMain.lua b/Content/Lua/HomeLand/UI/Hearth/HearthMain.lua index 23d9bf6..50320c9 100644 --- a/Content/Lua/HomeLand/UI/Hearth/HearthMain.lua +++ b/Content/Lua/HomeLand/UI/Hearth/HearthMain.lua @@ -1,14 +1,39 @@ local WidgetUtils = require("Utils.UI.WidgetUtils") +local Emitter = require("Utils.Emitter") local HearthMain = {} +function HearthMain:ctor() + self.switch_to_prep_cook_station_handle = nil +end + function HearthMain:OnInitialized() self.BtnBack.OnClicked:Add(function() - WidgetUtils.Hide(self, "HearthMain") - end) - self.BtnOpenRecipe.OnClicked:Add(function() - WidgetUtils.Show(self, "RecipeMenu") + self:BP_Close() end) +end +function HearthMain:Construct() + self.switch_to_prep_cook_station_handle = Emitter.OnEvent( + "switch_to_prep_station", function() self:SwitchToPrepCookStation() end + ) +end + +function HearthMain:Destruct() + Emitter.OffEvent("switch_to_prep_station", self.switch_to_prep_cook_station_handle) +end + +function HearthMain:SwitchToPrepCookStation() + if self:IsAnimationPlaying(self.Anim_StartPrepCook) then + return + end + self:PlayAnimation(self.Anim_StartPrepCook, 0, 1, 0, 1, false) +end + +function HearthMain:OnAnimationFinished(anim) + if anim == self.Anim_StartPrepCook then + WidgetUtils.Show(self, "PreCookStation") + print("HearthMain:OnAnimationFinished") + end end return Class(nil, nil, HearthMain) \ No newline at end of file diff --git a/Content/Lua/HomeLand/UI/Hearth/PreCookStationPanel.lua b/Content/Lua/HomeLand/UI/Hearth/PreCookStationPanel.lua new file mode 100644 index 0000000..252206e --- /dev/null +++ b/Content/Lua/HomeLand/UI/Hearth/PreCookStationPanel.lua @@ -0,0 +1,40 @@ +local PreCookStationPanel = {} + +local PRE_COOK_TOOL_CNT = 3 + + +function PreCookStationPanel:ctor() + self.cook_tool_slots = {} +end +function PreCookStationPanel:OnInitialized() + self.BackBtn.OnClicked:Add(function() self:BP_Close() end) + + self.cook_tool_slots = {} + + for i = 1, PRE_COOK_TOOL_CNT do + local slot_name = "PreCookToolSlot_" .. tostring(i) + table.insert(self.cook_tool_slots, self[slot_name]) + end +end + +function PreCookStationPanel:Construct() + self:Refresh() +end + +function PreCookStationPanel:Destruct() + +end + +function PreCookStationPanel:Refresh() + self:RefreshPreCookTools() +end + +function PreCookStationPanel:RefreshPreCookTools() + local display_tools = {"PCT0001"} + for i = 1, PRE_COOK_TOOL_CNT do + self.cook_tool_slots[i]:SetPreCookToolID(display_tools[i]) + end +end + + +return Class(nil, nil, PreCookStationPanel) \ No newline at end of file diff --git a/Content/Lua/HomeLand/UI/Hearth/Widgets/CookPrepStationEntry.lua b/Content/Lua/HomeLand/UI/Hearth/Widgets/CookPrepStationEntry.lua new file mode 100644 index 0000000..f1abb43 --- /dev/null +++ b/Content/Lua/HomeLand/UI/Hearth/Widgets/CookPrepStationEntry.lua @@ -0,0 +1,11 @@ +local CookPrepStationEntry = {} +local Emitter = require("Utils.Emitter") + +function CookPrepStationEntry:OnInitialized() + self.MainBtn.OnClicked:Add(function() + Emitter.EmitEvent("switch_to_prep_station") + end) +end + + +return Class(nil, nil, CookPrepStationEntry) \ No newline at end of file diff --git a/Content/Lua/HomeLand/UI/Hearth/Widgets/CookingBench.lua b/Content/Lua/HomeLand/UI/Hearth/Widgets/CookingBench.lua index 39ad7d1..d7a9a80 100644 --- a/Content/Lua/HomeLand/UI/Hearth/Widgets/CookingBench.lua +++ b/Content/Lua/HomeLand/UI/Hearth/Widgets/CookingBench.lua @@ -88,11 +88,11 @@ end function CookingBench:UpdateCookState() if self.temperature > 0 then - self.WBP_CookingProcess:SetVisible(true) + self.WBP_CookingProcess:BP_SetVisible(true) local percent = self.temperature / self.max_temperature self.WBP_CookingProcess.TemperatureProcess:SetPercent(percent) else - self.WBP_CookingProcess:SetVisible(false) + self.WBP_CookingProcess:BP_SetVisible(false) end end diff --git a/Content/Lua/HomeLand/UI/Hearth/Widgets/PreCookSlot.lua b/Content/Lua/HomeLand/UI/Hearth/Widgets/PreCookSlot.lua new file mode 100644 index 0000000..83ee171 --- /dev/null +++ b/Content/Lua/HomeLand/UI/Hearth/Widgets/PreCookSlot.lua @@ -0,0 +1,35 @@ +local DataTableUtils = require("Utils.DataTableUtils") +local PreCookSlot = {} + +function PreCookSlot:OnInitialized() + +end + +function PreCookSlot:Construct() + +end + +function PreCookSlot:Destruct() + +end + +function PreCookSlot:Reset() + + +end + +function PreCookSlot:SetPreCookToolID(pre_cook_tool_id) + self:Reset() + if not pre_cook_tool_id then return end + + local row_data = DataTableUtils.GetDataTableRow("PreCookItemConfig", pre_cook_tool_id) + if not row_data then + return + end + + self.SlotImg:SetBrushFromSoftTexture(row_data.DisplayResource, true) + print("PreCookSlot:SetPreCookToolID", row_data) +end + + +return Class(nil, nil, PreCookSlot) \ No newline at end of file diff --git a/Content/Lua/UI/UIHud/HomeLandHud.lua b/Content/Lua/UI/UIHud/HomeLandHud.lua index dd39872..cb49957 100644 --- a/Content/Lua/UI/UIHud/HomeLandHud.lua +++ b/Content/Lua/UI/UIHud/HomeLandHud.lua @@ -1,7 +1,7 @@ local HomeLandHud = {} function HomeLandHud:ReceiveBeginPlay() - self:ShowWidget("HomeLandMain") + self:BP_PushWidget("HomeLandMain") end return Class(nil, nil, HomeLandHud) \ No newline at end of file diff --git a/Content/Lua/Utils/DataTableUtils.lua b/Content/Lua/Utils/DataTableUtils.lua new file mode 100644 index 0000000..9abf47b --- /dev/null +++ b/Content/Lua/Utils/DataTableUtils.lua @@ -0,0 +1,39 @@ +local DataTableUtils = {} +local BusyGamePlayLibrary = import("BusyGamePlayLibrary") + + +function DataTableUtils.GetDataTable(table_name) + return BusyGamePlayLibrary.GetGameDataTable(table_name) +end + +function DataTableUtils.GetDataTableRow(table_name, row_name) + local data_table = DataTableUtils.GetDataTable(table_name) + if not data_table then + return nil + end + return data_table:FindRow(row_name) +end + + +--[[ +LuaExtensionMethod.cpp:22-28 + + +// 封装函数示例 +static int FindRowWrapper(lua_State* L) { + UDataTable* dataTable = LuaObject::checkUD(L, 1); + FName rowName = LuaObject::checkValue(L, 2); + UScriptStruct* rowStruct = LuaObject::checkUD(L, 3); + // 使用反射调用 FindRow + uint8* rowData = dataTable->FindRowUnchecked(rowName); + if (rowData && rowStruct) { + // 将结果推送到 Lua + return LuaObject::pushStruct(L, rowStruct, rowData); + } + return LuaObject::pushNil(L); +} +这段代码中,pushStruct只接受两个参数,如何改 + +]] + +return DataTableUtils \ No newline at end of file diff --git a/Content/Lua/Utils/UI/WidgetUtils.lua b/Content/Lua/Utils/UI/WidgetUtils.lua index 1a9f3e4..39b9bf8 100644 --- a/Content/Lua/Utils/UI/WidgetUtils.lua +++ b/Content/Lua/Utils/UI/WidgetUtils.lua @@ -10,10 +10,10 @@ end function WidgetUtils.Show(wco, widget_name) local hud = GetHud(wco) if not hud then return end - return hud:ShowWidget(widget_name) + return hud:BP_PushWidget(widget_name) end -function WidgetUtils.Hide(wco, widget_name) +function WidgetUtils.Close(wco, widget_name) local hud = GetHud(wco) if not hud then return end return hud:PopWidget(widget_name) diff --git a/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/barrel.uasset b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/barrel.uasset new file mode 100644 index 0000000..8291877 Binary files /dev/null and b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/barrel.uasset differ diff --git a/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/cutting_board.uasset b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/cutting_board.uasset new file mode 100644 index 0000000..33c1312 Binary files /dev/null and b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/cutting_board.uasset differ diff --git a/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/knife.uasset b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/knife.uasset new file mode 100644 index 0000000..5e3b37c Binary files /dev/null and b/Content/Resource/Texture/UI/Homeland/Hearth/PreCook/knife.uasset differ diff --git a/Content/UI/HomeLand/Hearth/WBP_HearthMain.uasset b/Content/UI/HomeLand/Hearth/WBP_HearthMain.uasset index 94a694d..9d40787 100644 Binary files a/Content/UI/HomeLand/Hearth/WBP_HearthMain.uasset and b/Content/UI/HomeLand/Hearth/WBP_HearthMain.uasset differ diff --git a/Content/UI/HomeLand/Hearth/WBP_PreCookStationPanel.uasset b/Content/UI/HomeLand/Hearth/WBP_PreCookStationPanel.uasset new file mode 100644 index 0000000..bc12dc0 Binary files /dev/null and b/Content/UI/HomeLand/Hearth/WBP_PreCookStationPanel.uasset differ diff --git a/Content/UI/HomeLand/Hearth/Widgets/PrepCookStation/WBP_PreCookSlot.uasset b/Content/UI/HomeLand/Hearth/Widgets/PrepCookStation/WBP_PreCookSlot.uasset new file mode 100644 index 0000000..858e7a5 Binary files /dev/null and b/Content/UI/HomeLand/Hearth/Widgets/PrepCookStation/WBP_PreCookSlot.uasset differ diff --git a/Content/UI/HomeLand/Hearth/Widgets/WBP_CookPrepStationEntry.uasset b/Content/UI/HomeLand/Hearth/Widgets/WBP_CookPrepStationEntry.uasset new file mode 100644 index 0000000..97122dd Binary files /dev/null and b/Content/UI/HomeLand/Hearth/Widgets/WBP_CookPrepStationEntry.uasset differ diff --git a/Source/BusyRabbit/Private/BusyGameInstance.cpp b/Source/BusyRabbit/Private/BusyGameInstance.cpp index 4c5abca..87572f2 100644 --- a/Source/BusyRabbit/Private/BusyGameInstance.cpp +++ b/Source/BusyRabbit/Private/BusyGameInstance.cpp @@ -7,6 +7,9 @@ #include "LuaCppBinding.h" #include "GameplayTagsManager.h" +extern void RegisterDataTableExtension(); + + static uint8* ReadFile(IPlatformFile& PlatformFile, FString path, uint32& len) { IFileHandle* FileHandle = PlatformFile.OpenRead(*path); if (FileHandle) { @@ -94,6 +97,8 @@ void UBusyGameInstance::LuaStateInitCallback(NS_SLUA::lua_State* L) { LuaGameInstance = state->doFile("GameInstance"); LuaGameInstance.getFromTable("OnEndFrame", OnLuaEndFrame); + // עextension + RegisterDataTableExtension(); } void UBusyGameInstance::OnEndFrame(){ diff --git a/Source/BusyRabbit/Private/Core/PW_UserWidget.cpp b/Source/BusyRabbit/Private/Core/PW_UserWidget.cpp index 62179fb..be8ae77 100644 --- a/Source/BusyRabbit/Private/Core/PW_UserWidget.cpp +++ b/Source/BusyRabbit/Private/Core/PW_UserWidget.cpp @@ -2,8 +2,10 @@ #include "Core/PW_UserWidget.h" +#include "Core/UI/PW_UIHud.h" UPW_SimpleWidget::UPW_SimpleWidget():bVisible(true){ + bVisible = true; SetVisibility(ESlateVisibility::SelfHitTestInvisible); } @@ -11,9 +13,9 @@ bool UPW_SimpleWidget::Initialize(){ return UUserWidget::Initialize(); } -void UPW_SimpleWidget::SetVisible(bool Visible){ - if (bVisible == Visible) { return; } - if ((bVisible = Visible)) { +void UPW_SimpleWidget::SetVisible(bool InVisible){ + if (bVisible == InVisible) { return; } + if ((bVisible = InVisible)) { SetVisibility(ESlateVisibility::SelfHitTestInvisible); } else { @@ -21,4 +23,32 @@ void UPW_SimpleWidget::SetVisible(bool Visible){ } } +void UPW_SimpleWidget::BP_SetVisible(bool InVisible){ + SetVisible(InVisible); +} +void UPW_UserWidget::BP_Close(){ + APW_UIHud* Hud = Cast(GetPlayerContext().GetHUD()); + if (!Hud) return; + Hud->PopWidget(this); +} + +void UPW_UserWidget::SetVisible(bool InVisible){ + bVisible = InVisible; + _RefreshVisible(); +} + +void UPW_UserWidget::FrameWorkSetVisible(bool InVisible){ + bFrameWorkVisible = InVisible; + _RefreshVisible(); +} + +void UPW_UserWidget::_RefreshVisible(){ + bool FinalVisible = bFrameWorkVisible && bVisible; + if (FinalVisible) { + SetVisibility(ESlateVisibility::SelfHitTestInvisible); + } + else { + SetVisibility(ESlateVisibility::Collapsed); + } +} diff --git a/Source/BusyRabbit/Private/Core/UI/PW_UIHud.cpp b/Source/BusyRabbit/Private/Core/UI/PW_UIHud.cpp index a8fcaab..964d8a4 100644 --- a/Source/BusyRabbit/Private/Core/UI/PW_UIHud.cpp +++ b/Source/BusyRabbit/Private/Core/UI/PW_UIHud.cpp @@ -27,7 +27,7 @@ UPW_UserWidget* APW_UIHud::PushWidget(const FName& WidgetName) { return nullptr; } - if (UILayer->PushWidget(WidgetName, Inst)) { + if (UILayer->PushWidget(Inst)) { return Inst; } else { @@ -35,28 +35,15 @@ UPW_UserWidget* APW_UIHud::PushWidget(const FName& WidgetName) { } } -bool APW_UIHud::PopWidget(const FName& WidgetName){ - if (UILayer == nullptr) { - return false; +UPW_UserWidget* APW_UIHud::PushWidget(UPW_UserWidget* WidgetInst){ + if (UILayer && WidgetInst) { + return UILayer->PushWidget(WidgetInst) ? WidgetInst : nullptr; } - return UILayer->PopWidget(WidgetName); + return nullptr; } -UPW_UserWidget* APW_UIHud::ShowWidget(const FName& WidgetName){ - UPW_UserWidget* Widget; - if (!UILayer) { - return nullptr; +void APW_UIHud::PopWidget(const UPW_UserWidget* WidgetInst){ + if (UILayer) { + UILayer->PopWidget(WidgetInst); } - if ((Widget = UILayer->ShowWidget(WidgetName))) { - return Widget; - } - return PushWidget(WidgetName); } - -bool APW_UIHud::HideWidget(const FName& WidgetName){ - if (UILayer == nullptr) { - return false; - } - return UILayer->PopWidget(WidgetName); -} - diff --git a/Source/BusyRabbit/Private/CppBindings/DataTableBindings.cpp b/Source/BusyRabbit/Private/CppBindings/DataTableBindings.cpp new file mode 100644 index 0000000..63fbf44 --- /dev/null +++ b/Source/BusyRabbit/Private/CppBindings/DataTableBindings.cpp @@ -0,0 +1,60 @@ +#include "LuaCppBinding.h" + +using namespace slua; + +//static int LuaBinding_FindRow(lua_State* L) { +// UDataTable* DataTable = LuaObject::checkUD(L, 1); +// FName RowName = LuaObject::checkValue(L, 2); +// +// UScriptStruct* RowStruct = (UScriptStruct*)DataTable->GetRowStruct(); +// +// uint8* RowData = DataTable->FindRowUnchecked(RowName); +// +// if (RowData && RowStruct) { +// // LuaStruct װ +// uint32 size = RowStruct->GetStructureSize() ? RowStruct->GetStructureSize() : 1; +// uint8* buf = (uint8*)FMemory::Malloc(size); +// RowStruct->InitializeStruct(buf); +// RowStruct->CopyScriptStruct(buf, RowData); +// +// LuaStruct* ls = new LuaStruct(); +// ls->Init(buf, size, RowStruct, false); +// return LuaObject::push(L, ls); +// } +// else { +// return LuaObject::pushNil(L); +// } +//} + +static int LuaBinding_FindRow(lua_State* L) { + UDataTable* DataTable = LuaObject::checkUD(L, 1); + FName RowName = LuaObject::checkValue(L, 2); + + FTableRowBase* TableRow = DataTable->FindRow(RowName, TEXT("")); + + const UScriptStruct* rowStruct = DataTable->GetRowStruct(); + + LuaStruct* luaStruct = new LuaStruct(); + luaStruct->Init((uint8*)TableRow, rowStruct->GetStructureSize(), (UScriptStruct*)rowStruct, true); + + LuaObject::addLink(L, TableRow); // ȷ + + //auto ret = LuaObject::push(L, luaStruct); + return LuaObject::pushReference(L, luaStruct, TableRow); +} + + +//FTableRowBase* tableRow = DataTable->FindRow(RowName, TEXT("")); +// +//UScriptStruct* rowStruct = DataTable->GetRowStruct(); +// +//LuaStruct* luaStruct = new LuaStruct(); +//luaStruct->Init((uint8*)tableRow, rowStruct->GetStructureSize(), rowStruct, true); +// +//int ret = LuaObject::push(L, luaStruct); + + + +extern void RegisterDataTableExtension() { + REG_EXTENSION_METHOD_IMP(UDataTable, "FindRow", { return LuaBinding_FindRow(L); }); +} diff --git a/Source/BusyRabbit/Private/Tables/BusyPreCookTable.cpp b/Source/BusyRabbit/Private/Tables/BusyPreCookTable.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/BusyRabbit/Public/BusyGamePlayLibrary.h b/Source/BusyRabbit/Public/BusyGamePlayLibrary.h index 265e41a..f20ddbd 100644 --- a/Source/BusyRabbit/Public/BusyGamePlayLibrary.h +++ b/Source/BusyRabbit/Public/BusyGamePlayLibrary.h @@ -11,6 +11,7 @@ #include "BusyActorManagerSubSystem.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "GameAsset/BusyItem.h" +#include "LuaBlueprintLibrary.h" #include "BusyGamePlayLibrary.generated.h" /** @@ -57,4 +58,8 @@ public: UFUNCTION(BlueprintPure) static bool GetCookMaterialStateConfig(const FName& RowName, FBusyCookMaterialStateConfig& RowData); + + UFUNCTION(BlueprintPure) + static FLuaBPVar TestTable(const FName& RowName); + }; diff --git a/Source/BusyRabbit/Public/BusyRabbit.lnk b/Source/BusyRabbit/Public/BusyRabbit.lnk deleted file mode 100644 index 16c8e3c..0000000 Binary files a/Source/BusyRabbit/Public/BusyRabbit.lnk and /dev/null differ diff --git a/Source/BusyRabbit/Public/Core/PW_UserWidget.h b/Source/BusyRabbit/Public/Core/PW_UserWidget.h index c9f1823..c0c16ef 100644 --- a/Source/BusyRabbit/Public/Core/PW_UserWidget.h +++ b/Source/BusyRabbit/Public/Core/PW_UserWidget.h @@ -28,12 +28,14 @@ public: virtual bool Initialize() override; public: - UPROPERTY(BlueprintReadOnly) - bool bVisible; + virtual void SetVisible(bool InVisible); + + UFUNCTION(BlueprintCallable) + void BP_SetVisible(bool InVisible); public: - UFUNCTION(BlueprintCallable) - void SetVisible(bool Visible); + UPROPERTY(BlueprintReadOnly) + bool bVisible; }; @@ -52,4 +54,21 @@ public: public: UPROPERTY(BlueprintReadOnly, EditDefaultsOnly) EWidgetLayoutType LayoutType; + +public: + UFUNCTION(BlueprintCallable) + void BP_Close(); + +public: + virtual void SetVisible(bool InVisible)override; + +public: + void FrameWorkSetVisible(bool InVisible); + +protected: + void _RefreshVisible(); + +protected: + bool bFrameWorkVisible; // 框架控制的显隐,高优先级 + }; diff --git a/Source/BusyRabbit/Public/Core/UI/PW_UIHud.h b/Source/BusyRabbit/Public/Core/UI/PW_UIHud.h index cdaaea6..a1e4c26 100644 --- a/Source/BusyRabbit/Public/Core/UI/PW_UIHud.h +++ b/Source/BusyRabbit/Public/Core/UI/PW_UIHud.h @@ -17,16 +17,17 @@ class BUSYRABBIT_API APW_UIHud : public AHUD, public ILuaOverriderInterface { public: UFUNCTION(BlueprintCallable) + UPW_UserWidget* BP_PushWidget(const FName& WidgetName) { return PushWidget(WidgetName); } + + UFUNCTION(BlueprintCallable) + void BP_PopWidget(const UPW_UserWidget* WidgetInst) { PopWidget(WidgetInst); } + +public: UPW_UserWidget* PushWidget(const FName& WidgetName); - UFUNCTION(BlueprintCallable) - bool PopWidget(const FName& WidgetName); + UPW_UserWidget* PushWidget(UPW_UserWidget* WidgetInst); - UFUNCTION(BlueprintCallable) - UPW_UserWidget* ShowWidget(const FName& WidgetName); - - UFUNCTION(BlueprintCallable) - bool HideWidget(const FName& WidgetName); + void PopWidget(const UPW_UserWidget* WidgetInst); public: UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) diff --git a/Source/BusyRabbit/Public/Core/UI/PW_UILayer.h b/Source/BusyRabbit/Public/Core/UI/PW_UILayer.h index 6efc4d9..832b194 100644 --- a/Source/BusyRabbit/Public/Core/UI/PW_UILayer.h +++ b/Source/BusyRabbit/Public/Core/UI/PW_UILayer.h @@ -17,13 +17,12 @@ class BUSYRABBIT_API UPW_UILayer : public UPW_UserWidget GENERATED_BODY() public: - UPW_UserWidget* ShowWidget(const FName& WidgetName); + bool PushWidget(UPW_UserWidget* WidgetInst); - bool HideWidget(const FName& WidgetName); + void PopWidget(const UPW_UserWidget* WidgetInst); - bool PushWidget(const FName& WidgetName, UPW_UserWidget* WidgetInst); - - bool PopWidget(const FName& WidgetName); +protected: + UOverlay* _GetOverlayByLayerType(EWidgetLayoutType InLayoutType); protected: @@ -39,6 +38,4 @@ protected: UPROPERTY(BlueprintReadOnly, meta = (BindWidget)) TObjectPtr TopLayer; -protected: - TMap WidgetPool; }; diff --git a/Source/BusyRabbit/Public/Tables/BusyPreCookTable.h b/Source/BusyRabbit/Public/Tables/BusyPreCookTable.h new file mode 100644 index 0000000..894e5d1 --- /dev/null +++ b/Source/BusyRabbit/Public/Tables/BusyPreCookTable.h @@ -0,0 +1,23 @@ +#pragma once +#include "CoreMinimal.h" +#include "Engine/Texture2D.h" +#include "BusyPreCookTable.generated.h" + + +USTRUCT() +struct FBusyPreCookItemConfig: public FTableRowBase { + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadOnly, DisplayName = "名称") + FText Name; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, DisplayName = "描述") + FText Desc; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, DisplayName = "备注") + FString Description; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, DisplayName = "用于显示的资源") + TSoftObjectPtr DisplayResource; + +};