Navigation
API > API/Developer > API/Developer/ToolWidgets
This is a custom dialog class, which allows any Slate widget to be used as the contents, with any number of buttons that have any text. It also supports adding a custom icon to the dialog.
Usage: TSharedRef
/ returns 0 when OK is pressed, 1 when Cancel is pressed, -1 if the window is closed const int ButtonPressed = HelloWorldDialog->ShowModal();
Note: If the content is only text, see SMessageDialog.
| Name | SCustomDialog |
| Type | class |
| Header File | /Engine/Source/Developer/ToolWidgets/Public/Dialog/SCustomDialog.h |
| Include Path | #include "Dialog/SCustomDialog.h" |
Syntax
class SCustomDialog : public SWindow
Inheritance Hierarchy
- FGCObject → FSlateInvalidationRoot → SWindow → SCustomDialog
- FNoncopyable → FSlateInvalidationRoot → SWindow → SCustomDialog
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SWindow → SCustomDialog
- FSlateControlledConstruction → SWidget → SCompoundWidget → SWindow → SCustomDialog
Derived Classes
SCustomDialog derived class hierarchy
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FButton |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAutoCloseOnButtonPress | bool | Dialog/SCustomDialog.h | ||
| LastPressedButton | int32 | The index of the button that was pressed last. | Dialog/SCustomDialog.h | |
| OnClosed | FSimpleDelegate | Dialog/SCustomDialog.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Dialog/SCustomDialog.h | ||
void Show() |
Show the dialog. This method will return immediately. | Dialog/SCustomDialog.h | |
int32 ShowModal () |
Show a modal dialog. | Dialog/SCustomDialog.h |