Working on radial menus
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "RadialMenu.generated.h"
|
||||
|
||||
class SRadialMenu;
|
||||
class UTexture2D;
|
||||
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
@@ -86,7 +87,31 @@ class URadialMenuWidget : public UWidget
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void Configure(int32 NItems, float ItemHeight, float InnerRadius, float MinSpoke, float Spread);
|
||||
void SetNumItems(int32 NewNumItems);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetItemHeight(float NewItemHeight);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetInnerRadius(float NewInnerRadius);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetMinSpoke(float NewMinSpoke);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetSpread(float NewSpread);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetLineThickness(float NewLineThickness);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetLineColor(FLinearColor NewLineColor);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetDotTexture(UTexture2D* NewDotTexture);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SetDotRadius(float NewDotRadius);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
URadialMenuLayout* GetLayout() const { return Layout; }
|
||||
@@ -94,11 +119,38 @@ public:
|
||||
protected:
|
||||
virtual TSharedRef<SWidget> RebuildWidget() override;
|
||||
virtual void ReleaseSlateResources(bool bReleaseChildren) override;
|
||||
virtual void SynchronizeProperties() override;
|
||||
|
||||
private:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(ClampMin="0", AllowPrivateAccess="true"))
|
||||
int32 NumItems = 8;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float ItemHeight = 20.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float InnerRadius = 20.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float MinSpoke = 20.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float Spread = 20.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float LineThickness = 2.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
FLinearColor LineColor = FLinearColor::White;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
TObjectPtr<UTexture2D> DotTexture;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Category="RadialMenu", meta=(AllowPrivateAccess="true"))
|
||||
float DotRadius = 0.0f;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<URadialMenuLayout> Layout;
|
||||
|
||||
TSharedPtr<SRadialMenu> MySlateWidget;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user