Limen Framework 0.1 Help

ULimenMenuButton

Overview

ULimenMenuButton is a subclass of ULimenStandardButton and implements the FTickableGameObject interface. It provides a customizable menu button with optional icon support, hover and click effects, and sound playback. The widget rebuilds its Slate representation dynamically based on properties set in the editor.

Properties

Type

Name

Access

Description

bool

bUseIcon

EditAnywhere, BlueprintReadOnly

Determines whether to use an icon on the button.

FSlateBrush

IconBrush

EditAnywhere, BlueprintReadOnly

The brush used for the icon when bUseIcon is true.

FMargin

IconMargin

EditAnywhere, BlueprintReadOnly

Margin around the icon.

FName

TextureParameter

EditAnywhere, BlueprintReadOnly

Parameter name for texture effects in the material.

FName

ToggleParameter

EditAnywhere, BlueprintReadOnly

Parameter name for toggle effects in the material.

UMaterialInterface*

EffectMaterial

EditAnywhere, BlueprintReadOnly

Material to apply effects on hover and click.

float

EffectDurationSeconds

EditAnywhere, BlueprintReadOnly

Duration of the distortion effect.

USoundBase*

HoverSound

EditAnywhere, BlueprintReadOnly

Sound played when the button is hovered over.

USoundBase*

UnhoverSound

EditAnywhere, BlueprintReadOnly

Sound played when the mouse leaves the button.

USoundBase*

ClickSound

EditAnywhere, BlueprintReadOnly

Sound played when the button is clicked.

Functions

Return Type

Signature

Description

void

PostInitProperties()

Called after properties are initialized. Sets tickable type if not a class default object.

void

ReleaseSlateResources(bool bReleaseChildren)

Releases Slate resources, including icon and text block references.

void

Tick(float DeltaTime)

Ticks the button to update hover effect elapsed time.

ETickableTickType

GetTickableTickType() const

Returns the tick type for this object.

bool

IsTickable() const

Determines if the object is tickable.

TStatId

GetStatId() const

Returns a unique identifier for performance statistics.

bool

IsTickableWhenPaused() const

Determines if the object should be ticked when paused.

bool

IsTickableInEditor() const

Determines if the object should be ticked in the editor.

UWorld*

GetTickableGameObjectWorld() const

Returns the world associated with this tickable object.

TSharedRef<SWidget>

RebuildWidget() override

Rebuilds the Slate widget based on current properties.

FReply

OnClicked() override

Handles the button click event, playing distortion effect and sound.

void

OnHovered() override

Handles the mouse hover event, showing icon and playing hover sound.

void

OnUnhovered() override

Handles the mouse unhover event, hiding icon and playing unhover sound.

TSharedRef<SImage>

GetIcon() const

Returns a reference to the icon widget.

bool

PlayDistortionEffect()

Plays the distortion effect on hover or click.

void

StopDistortionEffect()

Stops the distortion effect and resets elapsed time.

Usage & Implementation Notes

  • The button is tickable when not in design mode.

  • The distortion effect is played on hover and click, with a duration controlled by EffectDurationSeconds.

  • Sound effects are played during hover and click events using UGameplayStatics::PlaySound2D.

22 May 2026