Navigation
API > API/Runtime > API/Runtime/GameMenuBuilder
Simple Menu page widget class.
| Name | SGameMenuPageWidget |
| Type | class |
| Header File | /Engine/Source/Runtime/GameMenuBuilder/Public/SGameMenuPageWidget.h |
| Include Path | #include "SGameMenuPageWidget.h" |
Syntax
class SGameMenuPageWidget : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SGameMenuPageWidget
- FSlateControlledConstruction → SWidget → SCompoundWidget → SGameMenuPageWidget
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnSelectionChanged | TBaseDelegate_TwoParams< void, TSharedPtr< class FGameMenuItem >, TSharedPtr< class FGameMenuItem > > | Delegate for selection changing. Passes old and new selection. | SGameMenuPageWidget.h |
| FOnToggleMenu | TBaseDelegate_NoParams< void > | Delegate to call when in-game menu should be hidden using controller buttons - it's workaround as when joystick is captured, even when sending FReply::Unhandled, binding does not receive input :( | SGameMenuPageWidget.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MyGameViewport | TWeakObjectPtr< UGameViewportClient > | The viewport I am attached to. | SGameMenuPageWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildAndShowMenu
(
TSharedPtr< FGameMenuPage > InMenu |
Show the given menu and make it the current menu. | SGameMenuPageWidget.h | |
void ChangeOption
(
int32 InMoveBy |
Change the currently selection option of the currently selected menu item. | SGameMenuPageWidget.h | |
void ConfirmMenuItem() |
Confirms current menu item and performs an action. Will also play selection sound. | SGameMenuPageWidget.h | |
void Construct
(
const FArguments& InArgs |
Every widget needs a construction function. | SGameMenuPageWidget.h | |
void EnterSubMenu
(
TSharedPtr< FGameMenuPage > InSubMenu |
Make the currently selected menu sub menu new main menu if valid. | SGameMenuPageWidget.h | |
TSharedPtr< FGameMenuPage > GetCurrentMenu() |
SGameMenuPageWidget.h | ||
void HideMenu() |
Hide the menu. | SGameMenuPageWidget.h | |
void LockControls
(
bool bEnable |
Disable/enable moving around menu. | SGameMenuPageWidget.h | |
void MenuGoBack
(
bool bIsCancel |
Go back the the previous menu. | SGameMenuPageWidget.h | |
virtual void OnMainPanelStateChange
(
bool bWasOpened |
Callback handler for when the state of the main panel changes. | SGameMenuPageWidget.h | |
virtual void OnSubPanelStateChange
(
bool bWasOpened |
Callback handler for when the state of the sub panel changes.b | SGameMenuPageWidget.h | |
void OpenMainPanel
(
TSharedPtr< FGameMenuPage > InMenu |
Set the current menu and 'open' it as the main panel. | SGameMenuPageWidget.h | |
void ResetMenu() |
SGameMenuPageWidget.h | ||
bool SelectItem
(
int32 InSelection |
Select a given item from an index | SGameMenuPageWidget.h | |
void SetupAnimations() |
Setups misc animation sequences. | SGameMenuPageWidget.h | |
void UpdateArrows
(
TSharedPtr< class FGameMenuItem > InMenuItem |
Updates arrows visibility for multi-choice menu item. | SGameMenuPageWidget.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
The menu sets up the appropriate mouse settings upon focus. | SGameMenuPageWidget.h | |
| Key down handler. | SGameMenuPageWidget.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
Mouse button down handler. | SGameMenuPageWidget.h | |
virtual bool SupportsKeyboardFocus() |
Says that we can support keyboard focus. | SGameMenuPageWidget.h | |
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Update function. | SGameMenuPageWidget.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildPanelButtons
(
TSharedPtr< FGameMenuPage > InPanel, |
Rebuild the widgets in the main menu widget. | SGameMenuPageWidget.h | |
void FadeIn() |
Start the main menu open fade/anim and set keyboard focu.s | SGameMenuPageWidget.h | |
FMargin GetMainMenuOffset() |
SGameMenuPageWidget.h | ||
FMargin GetMenuItemPadding() |
SGameMenuPageWidget.h | ||
FMargin GetMenuOffset() |
SGameMenuPageWidget.h | ||
FText GetMenuTitle() |
Gets current menu title string. | SGameMenuPageWidget.h | |
FMargin GetMenuTitleOffset() |
SGameMenuPageWidget.h | ||
EVisibility GetMenuTitleVisibility() |
Gets the menu title visibility based on if the title text is empty. | SGameMenuPageWidget.h | |
FText GetOptionText
(
TSharedPtr< class FGameMenuItem > MenuItem |
Gets currently selected multi-choice option. | SGameMenuPageWidget.h | |
FSlateColor GetPanelsBackgroundColor() |
SGameMenuPageWidget.h | ||
FLinearColor GetPanelsColor() |
Misc Getters used for animating/fading various menu facets. | SGameMenuPageWidget.h | |
EVisibility GetSlateVisibility() |
Sets hit test invisibility when console is up. | SGameMenuPageWidget.h | |
FMargin GetSubMenuItemPadding() |
SGameMenuPageWidget.h | ||
FMargin GetSubMenuOffset() |
SGameMenuPageWidget.h | ||
EVisibility GetSubMenuVisiblity() |
Returns true if the submenu should be visible. | SGameMenuPageWidget.h | |
FSlateColor GetTextColor() |
SGameMenuPageWidget.h | ||
FSlateColor GetTitleColor() |
SGameMenuPageWidget.h | ||
float GetUIScale() |
Gets current scale for drawing menu. | SGameMenuPageWidget.h | |
virtual FReply MouseButtonClicked
(
int32 SelectionIndex |
Callback for handling mouse click. | SGameMenuPageWidget.h | |
void OpenPendingSubMenu() |
Opens any pending sub menu if there is one. | SGameMenuPageWidget.h | |
virtual FReply SelectionChanged
(
int32 SelectionIndex |
Callback for when one of the menu items is selected. | SGameMenuPageWidget.h | |
void SetCurrentMenu
(
TSharedPtr< FGameMenuPage > InMenu |
Set the current menu. | SGameMenuPageWidget.h | |
void SetTitleAnimation
(
bool bShowTitle |
Animates the title widget. | SGameMenuPageWidget.h |