UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGameMenuItem Class Reference

#include <GameMenuItem.h>

+ Inheritance diagram for FGameMenuItem:

Public Member Functions

 DECLARE_DELEGATE (FOnConfirmMenuItem)
 
 DECLARE_DELEGATE_TwoParams (FOnOptionChanged, TSharedPtr< FGameMenuItem >, int32)
 
 FGameMenuItem (FText _text)
 
 FGameMenuItem (TSharedPtr< SGameMenuItemWidget > InWidget)
 
 FGameMenuItem (FText InText, TArray< FText > InOptions, int32 InDefaultIndex=0)
 
bool ConfirmPressed ()
 
- Public Member Functions inherited from TSharedFromThis< FGameMenuItem >
TSharedRef< FGameMenuItem, Mode > AsShared ()
 
TSharedRef< FGameMenuItem const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FGameMenuItem, Mode > AsWeak ()
 
TWeakPtr< FGameMenuItem const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static TSharedRef< FGameMenuItemCreateRoot ()
 

Public Attributes

FOnConfirmMenuItem OnConfirmMenuItem
 
FOnOptionChanged OnOptionChanged
 
EGameMenuItemType::Type MenuItemType
 
FText Text
 
TSharedPtr< class FGameMenuPageSubMenu
 
TSharedPtr< SGameMenuItemWidgetWidget
 
TSharedPtr< SGameMenuItemWidgetCustomWidget
 
TArray< FTextMultiChoice
 
int32 MinMultiChoiceIndex
 
int32 MaxMultiChoiceIndex
 
int32 SelectedMultiChoice
 
bool bInactive
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< FGameMenuItem >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FGameMenuItem >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Constructor & Destructor Documentation

◆ FGameMenuItem() [1/3]

FGameMenuItem::FGameMenuItem ( FText  _text)
inline

constructor accepting menu item text

◆ FGameMenuItem() [2/3]

FGameMenuItem::FGameMenuItem ( TSharedPtr< SGameMenuItemWidget InWidget)
inline

custom widgets cannot contain sub menus, all functionality must be handled by custom widget itself

◆ FGameMenuItem() [3/3]

FGameMenuItem::FGameMenuItem ( FText  InText,
TArray< FText InOptions,
int32  InDefaultIndex = 0 
)
inline

constructor for multi-choice item

Member Function Documentation

◆ ConfirmPressed()

bool FGameMenuItem::ConfirmPressed ( )
inline

◆ CreateRoot()

static TSharedRef< FGameMenuItem > FGameMenuItem::CreateRoot ( )
inlinestatic

create special root item

◆ DECLARE_DELEGATE()

FGameMenuItem::DECLARE_DELEGATE ( FOnConfirmMenuItem  )

confirm menu item delegate

◆ DECLARE_DELEGATE_TwoParams()

FGameMenuItem::DECLARE_DELEGATE_TwoParams ( FOnOptionChanged  ,
TSharedPtr< FGameMenuItem ,
int32   
)

multi-choice option changed, parameters are menu item itself and new multi-choice index

Member Data Documentation

◆ bInactive

bool FGameMenuItem::bInactive

true if this item is active

◆ CustomWidget

TSharedPtr<SGameMenuItemWidget> FGameMenuItem::CustomWidget

shared pointer to actual slate widget representing the custom menu item, ie whole options screen

◆ MaxMultiChoiceIndex

int32 FGameMenuItem::MaxMultiChoiceIndex

set to other value than -1 to limit the options range

◆ MenuItemType

EGameMenuItemType::Type FGameMenuItem::MenuItemType

menu item type

◆ MinMultiChoiceIndex

int32 FGameMenuItem::MinMultiChoiceIndex

set to other value than -1 to limit the options range

◆ MultiChoice

TArray<FText> FGameMenuItem::MultiChoice

texts for multiple choice menu item (like INF AMMO ON/OFF or difficulty/resolution etc)

◆ OnConfirmMenuItem

FOnConfirmMenuItem FGameMenuItem::OnConfirmMenuItem

delegate, which is executed by SSimpleMenuWidget if user confirms this menu item

◆ OnOptionChanged

FOnOptionChanged FGameMenuItem::OnOptionChanged

multi-choice option changed, parameters are menu item itself and new multi-choice index

◆ SelectedMultiChoice

int32 FGameMenuItem::SelectedMultiChoice

selected multi-choice index for this menu item

◆ SubMenu

TSharedPtr<class FGameMenuPage> FGameMenuItem::SubMenu

sub menu if present

◆ Text

FText FGameMenuItem::Text

menu item text

◆ Widget

TSharedPtr<SGameMenuItemWidget> FGameMenuItem::Widget

shared pointer to actual slate widget representing the menu item


The documentation for this class was generated from the following file: