Limen Framework 0.1 Help

ULimenStandardButton

Overview

ULimenStandardButton is a custom UMG (Unreal Motion Graphics) widget that extends UWidget. It allows users to create interactive buttons with customizable text, styles, and event handlers. The class provides public functions to set and get button properties, as well as protected overrides for handling Slate events such as clicks and hovers.

Properties

Type

Name

Access

Description

FLGButtonClicked

OnButtonClickedEvent

Public

A delegate that is called when the button is clicked.

FLGButtonHover

OnButtonHoveredEvent

Public

A delegate that is called when the mouse hovers over the button.

FLGButtonHover

OnButtonUnhoveredEvent

Public

A delegate that is called when the mouse leaves the button.

FButtonStyle

ButtonStyle

Protected

The style of the button, including normal, hover, and pressed states.

FText

Text

Protected

The text displayed on the button.

EHorizontalAlignment

TextHorizontalAlignment

Protected

The horizontal alignment of the button text.

EVerticalAlignment

TextVerticalAlignment

Protected

The vertical alignment of the button text.

FSlateFontInfo

Font

Protected

The font used for the button text.

FColor

TextColor

Protected

The color of the button text.

FMargin

TextMargin

Protected

The margin around the button text.

ETextJustify::Type

TextJustification

Protected

The justification of the button text.

FGuid

ButtonId

Private

A unique identifier for the button.

Functions

Return Type

Signature

Description

void

SetButtonText(const FText& NewText)

Sets the text displayed on the button.

void

SetButtonStyle(const FButtonStyle& NewStyle)

Sets the style of the button.

void

SetButtonNormalBrush(const FSlateBrush& NewBrush)

Sets the normal state brush for the button.

void

SetButtonFont(const FSlateFontInfo& NewFont)

Sets the font used for the button text.

const FGuid&

GetButtonId() const

Returns the unique identifier of the button.

const FText&

GetButtonText() const

Returns the current text displayed on the button.

TSharedRef<SWidget>

RebuildWidget() override

Rebuilds the Slate widget for this UMG component.

FReply

OnClicked() override

Handles the click event and broadcasts the OnButtonClickedEvent.

void

OnHovered() override

Handles the hover event and broadcasts the OnButtonHoveredEvent.

void

OnUnhovered() override

Handles the unhover event and broadcasts the OnButtonUnhoveredEvent.

Usage & Implementation Notes

  • The button widget is designed to be used in Unreal Engine 5 projects that utilize UMG for UI development.

  • The RebuildWidget function constructs the Slate widget hierarchy, combining a SButton with a STextBlock to display text and handle user interactions.

  • Event handlers (OnClicked, OnHovered, OnUnhovered) are bound to delegate functions that broadcast events to Blueprints or C++ code.

  • The button's style can be customized through the SetButtonStyle function, allowing for a wide range of visual options.

22 May 2026