Hey,
I am trying to create a menu system that I can build up in blueprints. The general idea is to have a radial menu (like in counter strike global offensive) that has several layers to it as you click through different buttons.
I want the user to be able to build this menu up in blueprints, and assign what method should be called by linking up a method in blueprints. Only thing is, I am new to Unreal and don’t really know what unreal properties or guidelines I should be following to do this. You can see in the code pasted below, the method pointer I would ideally like to expose to blueprints.
USTRUCT(BlueprintType)
struct FRadialItem {
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(BlueprintReadWrite, Category = "RadialItem, Name")
FString DisplayText;
//TODO: Expose this to blueprints
void (*selectedEvent)(FRadialItem*);
void OnInteractWith(ARadialHUD * caller) {
selectedEvent(this);
}
};
USTRUCT(BlueprintType)
struct FRadialItemContainer : public FRadialItem {
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadWrite, Category = "RadialItemGroup, Children")
TArray<FRadialItem> ChildItems;
void OnInteractWith(ARadialHUD * caller) {
selectedEvent(this);
caller->displayItems(ChildItems);
}
};
Thanks in advance