Always snap to grid

UE3:UTUIScene_MessageBox (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIScene >> UTUIScene >> UTUIScene_MessageBox
Package: 
UTGame
Direct subclasses:
UTUIScene_ConnectionStatus, UTUIScene_InputBox
This class in other games:
UT3

Generic Message Box Scene for UT3

Constants[edit]

MESSAGEBOX_MAX_POSSIBLE_OPTIONS[edit]

Value: 4


CANCEL_BUTTON_MARKUP_STRING[edit]

Value: "<Strings:UTGameUI.Generic.Cancel>"


Properties[edit]

Property group 'UTUIScene_MessageBox'[edit]

bRepositionMessageToCenter[edit]

Type: bool

Whether you want the message box's dialog and title to position itself to the center of the screen or not.

Default value: True

Internal variables[edit]

BackgroundImage[edit]

Type: UIObject

Modifiers: transient

Reference to the owning widget that has all of the content of the message box scene.

bFullyVisible[edit]

Type: bool

Modifiers: transient

Whether or not the message box is fully visible.

bHideOnNextTick[edit]

Type: bool

Modifiers: transient

Flag that lets the dialog know it should hide itself.

bRepositionButtons[edit]

Type: bool

Flag which is used natively to recalculate the dialog button positions

ButtonBar[edit]

Type: UTUIButtonBar

Modifiers: transient

References to the scene's buttonbar.

DefaultOptionIdx[edit]

Type: int

Modifiers: transient

Index of the option that is selected by default, valid for PC only.

DisplayTime[edit]

Type: float

Modifiers: transient

The time the message box was fully displayed.

FadeDirection[edit]

Type: int

Modifiers: transient

Direction we are currently fading, positive is fade in, negative is fade out, 0 is not fading.

FadeDuration[edit]

Type: float

Modifiers: transient

How long to take to display/hide the message box.

FadeStartTime[edit]

Type: float

Modifiers: transient

Time fading started.

MessageLabel[edit]

Type: UILabel

Modifiers: transient

Message box message.

MinimumDisplayTime[edit]

Type: float

Modifiers: transient

The minimum amount of time to display modal message boxes for.

PotentialOptionKeyMappings[edit]

Type: array<PotentialOptionKeys>

Modifiers: transient


PotentialOptions[edit]

Type: array<string>

Modifiers: transient

Array of potential options markup.

PreviouslySelectedOption[edit]

Type: int

Modifiers: transient

Stores which option the user selected.

ScrollWindow[edit]

Type: UIObject

Modifiers: transient

Reference to the scroll window that holds the message label.

SelectingPlayer[edit]

Type: int

Modifiers: transient

Index of the player that selected the option.

TitleLabel[edit]

Type: UILabel

Modifiers: transient

Message box title markup.

Default values[edit]

Property Value
NotifyResolutionChanged OnResolutionChanged
OnInterceptRawInputKey HandleInputKey
bPauseGameWhileActive False
bRenderParentScenes True
EventProvider UIComp_Event'WidgetEventComponent'
SceneRenderMode SPLITRENDER_Fullscreen
SceneSkin None

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Property Value
DisabledEventAliases[0] 'CloseScene'

Structs[edit]

PotentialOptionKeys[edit]

Modifiers: native

Arrays of key's that trigger each potential option.

array<name> Keys 

Delegates[edit]

OnClosed[edit]

delegate OnClosed ()

Delegate called after the message box has been competely closed.

OnMBInputKey[edit]

delegate bool OnMBInputKey (const out UIRoot.InputEventParameters EventParms)

Delegate to trap any input to the message box.

OnSelection[edit]

delegate OnSelection (UTUIScene_MessageBox MessageBox, int SelectedOption, int PlayerIndex)

The user has made a selection of the choices available to them.

Functions[edit]

Native functions[edit]

BeginHide[edit]

native function BeginHide ()

Starts hiding the message box.

BeginShow[edit]

native function BeginShow ()

Starts showing the message box.

Events[edit]

Initialized[edit]

event Initialized ()

Overrides: UIScreenObject.Initialized

Called once this screen object has been completely initialized, before it has activated its InitialState or called Initialize on its children. This event is only called the first time a widget is initialized. If reparented, for example, the widget would already be initialized so the Initialized event would not be called.

OnHideComplete[edit]

event OnHideComplete ()

Called when the dialog is finished hiding itself.

OnShowComplete[edit]

event OnShowComplete ()

Called when the dialog has finished showing itself.

PostInitialize[edit]

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

Sets delegates for the scene.

Other instance functions[edit]

Close[edit]

function Close (optional bool bSimulateCancel, optional int PlayerIndex)

Closes the message box, used for modal message boxes.

Parameters:

  • bSimulateCancel - specify TRUE to generate a cancel button press event; otherwise, whichever button is in the last slot (e.g. PotentialOptions[0]) will appear to have been pressed).
  • PlayerIndex - the index of the player that generated the close event.

Display[edit]

function Display (string Message, optional string Title, optional delegate<OnSelectionInSelectionDelegate, optional int InDefaultOptionIdx)

Displays the message box.

Parameters:

  • Message - Message for the message box. Should be datastore markup.
  • Title - Title for the message box. Should be datastore markup.
  • InSelectionDelegate - Delegate to call when the user dismisses the message box.

DisplayAcceptBox[edit]

function DisplayAcceptBox (string Message, optional string Title, optional delegate<OnSelectionInSelectionDelegate)

Displays a message box that has the default button layout; useful when you may be reusing the same scene instance

Parameters:

  • Message - Message for the message box. Should be datastore markup.
  • Title - Title for the message box. Should be datastore markup.
  • InSelectionDelegate - Delegate to call when the user dismisses the message box.

DisplayAcceptCancelBox[edit]

function DisplayAcceptCancelBox (string Message, optional string Title, optional delegate<OnSelectionInSelectionDelegate)

Displays a message box that has an accept and cancel button.

Parameters:

  • Message - Message for the message box. Should be datastore markup.
  • Title - Title for the message box. Should be datastore markup.
  • InSelectionDelegate - Delegate to call when the user dismisses the message box.

DisplayCancelBox[edit]

function DisplayCancelBox (string Message, optional string Title, optional delegate<OnSelectionInSelectionDelegate)

Displays a message box that has a cancel button only.

Parameters:

  • Message - Message for the message box. Should be datastore markup.
  • Title - Title for the message box. Should be datastore markup.
  • InSelectionDelegate - Delegate to call when the user dismisses the message box.

DisplayModalBox[edit]

function DisplayModalBox (string Message, optional string Title, optional float InMinDisplayTime)

Displays a message box that has no buttons and must be closed by the scene that opened it.

FindCancelButtonIndex[edit]

function int FindCancelButtonIndex (optional string CancelButtonMarkupString)

Determines the index of the button corresponding to the cancel button.

Parameters:

  • CancelButtonMarkupString - if a custom markup string was used for the cancel button, it can be specified here; otherwise the default markup string for the cancel button is used.

Returns:

the index of the button used to cancel this dialog, or INDEX_NONE if a cancel button wasn't found.

HandleInputKey[edit]

function bool HandleInputKey (const out UIRoot.InputEventParameters EventParms)

Provides a hook for unrealscript to respond to input using actual input key names (i.e. Left, Tab, etc.)

Called when an input key event is received which this widget responds to and is in the correct state to process. The keys and states widgets receive input for is managed through the UI editor's key binding dialog (F8).

This delegate is called BEFORE kismet is given a chance to process the input.

Parameters:

  • EventParms - information about the input event.

Returns:

TRUE to indicate that this input key was processed; no further processing will occur on this input key event.

OnOptionButton_Clicked[edit]

function bool OnOptionButton_Clicked (UIScreenObject EventObject, int PlayerIndex)

Callback for the OnClicked event.

Parameters:

  • EventObject - Object that issued the event.
  • PlayerIndex - Player that performed the action that issued the event.

Returns:

return TRUE to prevent the kismet OnClick event from firing.

OnResolutionChanged[edit]

function OnResolutionChanged (const out Object.Vector2D OldViewportsize, const out Object.Vector2D NewViewportSize)


OptionSelected[edit]

function OptionSelected (int OptionIdx, int PlayerIndex)

Called when a user has chosen one of the possible options available to them. Begins hiding the dialog and calls the On

Parameters:

  • OptionIdx - Index of the selection option.
  • PlayerIndex - Index of the player that selected the option.

SetMessage[edit]

function SetMessage (string NewMessage)

Sets the current message for this messagebox.

Parameters:

  • NewMessage - New message for the messagebox.

SetPotentialOptionKeyMappings[edit]

function SetPotentialOptionKeyMappings (array<PotentialOptionKeysInPotentialOptionKeyMappings)

Sets the potential option key mappings for a message box, usually this can be left to defaults.

Parameters:

  • InPotentialOptions - Potential options the user has to choose from.
  • InPotentialOptionsKeyMappings - Button keys that map to the options specified, usually this can be left to defaults.

SetPotentialOptions[edit]

function SetPotentialOptions (array<stringInPotentialOptions, optional array<PotentialOptionKeysInPotentialOptionKeyMappings)

Sets the potential options for a message box.

Parameters:

  • InPotentialOptions - Potential options the user has to choose from.
  • InPotentialOptionsKeyMappings - Button keys that map to the options specified, usually this can be left to defaults.

SetSelectionDelegate[edit]

function SetSelectionDelegate (delegate<OnSelectionInSelectionDelegate)

Wrapper for setting the OnSelection delegate.

SetTitle[edit]

function SetTitle (string NewTitle)

Changes the title for this messagebox.

Parameters:

  • NewTitle - the new title for the message box

SetupButtonBar[edit]

function SetupButtonBar ()

Overrides: UTUIScene.SetupButtonBar

Sets up the buttons that should be visible in the bar across the bottom of the scene.