Gah - a solution with more questions. – EntropicLqd

UE3:UIMessageBoxBase (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 11:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

Property group 'UIMessageBoxBase'

bPerformAutomaticLayout

Type: bool

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

ButtonBarButtonBGStyleName

Type: name

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

ButtonBarButtonTextStyleName

Type: name

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

ChoicesWidgetName

Type: name


MessageWidgetName

Type: name


QuestionWidgetImageName

Type: name


QuestionWidgetName

Type: name


TitleWidgetName

Type: name

Names of the above widgets

Internal variables

btnbarChoices

Type: UICalloutButtonPanel

Modifiers: transient


imgQuestion

Type: UIImage

Modifiers: transient


lblMessage

Type: UILabel

Modifiers: transient


lblQuestion

Type: UILabel

Modifiers: transient


lblTitle

Type: UILabel

Modifiers: transient

References to the widgets in the scene

Default values

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

SceneEventComponent

Class: Engine.UIComp_Event

Inherits from: UIScene.SceneEventComponent

Property Value
DisabledEventAliases[0] 'CloseScene'

Delegates

OnOptionSelected

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

AddButton

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

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

function UICalloutButtonPanel GetButtonBar ()

Returns:

the buttonbar for the message box

GetMessageLabel

function UILabel GetMessageLabel ()

Returns:

the label that displays the message box's message

GetTitleLabel

function UILabel GetTitleLabel ()

Returns:

the label that displays the message box's title string

HandleSceneActivated

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

function bool HasButton (name ButtonAlias)

Returns:

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

LayoutControls

function LayoutControls ()

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

OptionChosen

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

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

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

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

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

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

function SetupDockingRelationships ()

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

SetupMessageBox

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.