The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UIMessageBoxBase (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIScene >> UIMessageBoxBase
Package: 
Engine
Direct subclass:
UIMessageBox

Base class for message box scene types.

Copyright 1998-2009 Epic Games, Inc. All Rights Reserved

Properties[edit]

Property group 'UIMessageBoxBase'[edit]

bPerformAutomaticLayout[edit]

Type: bool

Whether or not you want the message box to handle the layout and docking automatically or not

ButtonBarButtonBGStyleName[edit]

Type: name

Name of the style to use for the image of the buttonbar buttons

ButtonBarButtonTextStyleName[edit]

Type: name

Name of the style to use for the string of the buttonbar buttons

ChoicesWidgetName[edit]

Type: name


MessageWidgetName[edit]

Type: name


QuestionWidgetImageName[edit]

Type: name


QuestionWidgetName[edit]

Type: name


TitleWidgetName[edit]

Type: name

Names of the above widgets

Internal variables[edit]

btnbarChoices[edit]

Type: UICalloutButtonPanel

Modifiers: transient


imgQuestion[edit]

Type: UIImage

Modifiers: transient


lblMessage[edit]

Type: UILabel

Modifiers: transient


lblQuestion[edit]

Type: UILabel

Modifiers: transient


lblTitle[edit]

Type: UILabel

Modifiers: transient

References to the widgets in the scene

Default values[edit]

Property Value
OnSceneActivated HandleSceneActivated
bPauseGameWhileActive False
bRenderParentScenes True
Position
Member Value
Value[0] 0.25
Value[1] 0.25
Value[2] 0.75
Value[3] 0.75
SceneRenderMode SPLITRENDER_Fullscreen

Subobjects[edit]

SceneEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UIScene.SceneEventComponent

Property Value
DisabledEventAliases[0] 'CloseScene'

Delegates[edit]

OnOptionSelected[edit]

delegate bool OnOptionSelected (UIMessageBoxBase Sender, name SelectedInputAlias, int PlayerIndex)

Called when the user selects an option.

Parameters:

  • Sender - the message box that generated this call
  • SelectedInputAlias - the alias of the button that the user selected. Should match one of the aliases passed into this message box.
  • PlayerIndex - the index of the player that selected the option.

Returns:

TRUE to indicate that the message box should close itself.

Instance functions[edit]

AddButton[edit]

function bool AddButton (name ButtonAlias)

Adds a button to the button bar, enabling the message box to respond to the input key associated with the button alias.

Parameters:

  • ButtonAlias - the buttonbar alias of the button that should be added to the buttonbar. This determines which options are available as well as which input keys the message box responds to. Aliases must be registered in the Engine.UIDataStore_InputAlias section of the input .ini file.

Returns:

TRUE if the button was successfully added to the buttonbar. FALSE if the alias wasn't registered or the button already existed in the buttonbar.

FindButtonIndex[edit]

function int FindButtonIndex (name ButtonAlias)

Find the location of a button in the buttonbar's list of buttons.

Parameters:

  • ButtonAlias - the buttonbar alias associated with the button to search for.

Returns:

the index into the buttonbar's list of buttons, or INDEX_NONE if it isn't found.

GetButtonBar[edit]

function UICalloutButtonPanel GetButtonBar ()

Returns:

the buttonbar for the message box

GetMessageLabel[edit]

function UILabel GetMessageLabel ()

Returns:

the label that displays the message box's message

GetTitleLabel[edit]

function UILabel GetTitleLabel ()

Returns:

the label that displays the message box's title string

HandleSceneActivated[edit]

function HandleSceneActivated (UIScene ActivatedScene, bool bInitialActivation)

Handler for scene's OnSceneActivated delegate.

Parameters:

  • ActivatedScene - the scene that was activated
  • bInitialActivation - TRUE if this is the first time this scene is being activated; FALSE if this scene has become active as a result of closing another scene or manually moving this scene in the stack.

HasButton[edit]

function bool HasButton (name ButtonAlias)

Returns:

TRUE if the button bar contains a button which has the specified alias.

LayoutControls[edit]

function LayoutControls ()

Applies any special formatting to the message box's internal controls.

OptionChosen[edit]

function bool OptionChosen (UIScreenObject EventObject, int PlayerIndex)

Handler for the buttonbar buttons' OnClicked delegate. Routes the notification to the scene's OnOptionSelected delegate.

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.

RemoveButton[edit]

function bool RemoveButton (name ButtonAlias)

Removes a button from the buttonbar. The messagebox will no longer respond to the input key associated with the button alias.

Parameters:

  • ButtonAlias - the buttonbar alias associated with the button that should be removed.

Returns:

TRUE if the button was successfully removed.

SetButtonCallback[edit]

function protected SetButtonCallback (UICalloutButton TargetButton)

Assign the button's OnClick delegate to a function in this scene, and set the styles for both the background and the text

Parameters:

  • TargetButton - the button to set the callback for.

SetMessage[edit]

function SetMessage (string NewMessageString)

Sets the text for the message box.

Parameters:

  • NewMessageString - the string or datastore markup to use for the message box text

SetQuestion[edit]

function SetQuestion (string NewMessageString)

Sets the text for the question. Will hide the widget if the string is empty

Parameters:

  • NewMessageString - the string or datastore markup to use for the question text

SetTitle[edit]

function SetTitle (string NewTitleString)

Sets the title for the message box.

Parameters:

  • NewTitleString - the string or datastore markup to use as the message box's title

SetupDockingRelationships[edit]

function SetupDockingRelationships ()

Sets up the docking links for the message box's controls

SetupMessageBox[edit]

function SetupMessageBox (string Title, string Message, string Question, array<nameButtonAliases, optional delegate<OnOptionSelectedSelectionCallback)

Sets the values for the message box controls.

Parameters:

  • Title - the string or datastore markup to use as the message box title
  • Message - the string or datastore markup to use for the message box text
  • Question - the string or datastore markup to use for the question text
  • ButtonAliases - the list of aliases to use in the message box's button bar; this determines which options are available as well as which input keys the message box responds to. Aliases must be registered in the Engine.UIDataStore_InputAlias section of the input .ini file.
  • SelectionCallback - specifies the function to call when the user makes a selection.