#pragma once #include "CoreMinimal.h" /** * Pieces shared by the window view-models (UI/ViewModels/*.h). A view-model is a plain struct a game system fills and the * window page draws from; a button in a page calls the TFunction the system left in the struct. The UI never includes a * gameplay header, and a gameplay system never includes a widget. */ using FDescentUiAction = TFunction; /** One ingredient: what a recipe needs and how much the player has. */ struct FDescentUiCost { FName ItemId; FString Name; int32 Need = 0; int32 Have = 0; bool IsMet() const { return Have >= Need; } };