There is no spoon

UE3:UTUIScene_MessageBox (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:02, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 8))

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

MESSAGEBOX_MAX_POSSIBLE_OPTIONS

Value: 4


CANCEL_BUTTON_MARKUP_STRING

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


Properties

Property group 'UTUIScene_MessageBox'

bRepositionMessageToCenter

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

BackgroundImage

Type: UIObject

Modifiers: transient

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

bFullyVisible

Type: bool

Modifiers: transient

Whether or not the message box is fully visible.

bHideOnNextTick

Type: bool

Modifiers: transient

Flag that lets the dialog know it should hide itself.

bRepositionButtons

Type: bool

Flag which is used natively to recalculate the dialog button positions

ButtonBar

Type: UTUIButtonBar

Modifiers: transient

References to the scene's buttonbar.

DefaultOptionIdx

Type: int

Modifiers: transient

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

DisplayTime

Type: float

Modifiers: transient

The time the message box was fully displayed.

FadeDirection

Type: int

Modifiers: transient

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

FadeDuration

Type: float

Modifiers: transient

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

FadeStartTime

Type: float

Modifiers: transient

Time fading started.

MessageLabel

Type: UILabel

Modifiers: transient

Message box message.

MinimumDisplayTime

Type: float

Modifiers: transient

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

PotentialOptionKeyMappings

Type: array<PotentialOptionKeys>

Modifiers: transient


PotentialOptions

Type: array<string>

Modifiers: transient

Array of potential options markup.

PreviouslySelectedOption

Type: int

Modifiers: transient

Stores which option the user selected.

ScrollWindow

Type: UIObject

Modifiers: transient

Reference to the scroll window that holds the message label.

SelectingPlayer

Type: int

Modifiers: transient

Index of the player that selected the option.

TitleLabel

Type: UILabel

Modifiers: transient

Message box title markup.

Default values

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

Subobjects

WidgetEventComponent

Class: Engine.UIComp_Event

Property Value
DisabledEventAliases[0] 'CloseScene'

Structs

PotentialOptionKeys

Modifiers: native

Arrays of key's that trigger each potential option.

array<name> Keys 

Delegates

OnClosed

delegate OnClosed ()

Delegate called after the message box has been competely closed.

OnMBInputKey

delegate bool OnMBInputKey (const out UIRoot.InputEventParameters EventParms)

Delegate to trap any input to the message box.

OnSelection

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

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

Functions

Native functions

BeginHide

native function BeginHide ()

Starts hiding the message box.

BeginShow

native function BeginShow ()

Starts showing the message box.

Events

Initialized

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

event OnHideComplete ()

Called when the dialog is finished hiding itself.

OnShowComplete

event OnShowComplete ()

Called when the dialog has finished showing itself.

PostInitialize

event PostInitialize ()

Overrides: UIScreenObject.PostInitialize

Sets delegates for the scene.

Other instance functions

Close

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

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

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

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

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

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

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

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

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

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


OptionSelected

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

function SetMessage (string NewMessage)

Sets the current message for this messagebox.

Parameters:

  • NewMessage - New message for the messagebox.

SetPotentialOptionKeyMappings

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

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

function SetSelectionDelegate (delegate<OnSelectionInSelectionDelegate)

Wrapper for setting the OnSelection delegate.

SetTitle

function SetTitle (string NewTitle)

Changes the title for this messagebox.

Parameters:

  • NewTitle - the new title for the message box

SetupButtonBar

function SetupButtonBar ()

Overrides: UTUIScene.SetupButtonBar

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