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

UE3:UTUIKeyBindingList (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIScreenObject >> UIObject >> UTUI_Widget >> UTDrawPanel >> UTUIOptionList >> UTUIKeyBindingList
Package: 
UTGame
Implemented interfaces
UIDataStoreSubscriber

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

Keybinding List, exposes a set of UTUIDataProvider_KeyBinding objects to the user so they can bind keys.

Properties[edit]

bCurrentlyBindingKey[edit]

Type: bool

Modifiers: transient

Whether or not we should try to bind the next key.

CrucialBindValues[edit]

Type: array<bool>

Modifiers: transient

List of bools to keep track of crucial binds that must be bound before exiting screen, the length of this array should match the generated objects array.

CurrentBindings[edit]

Type: array<string>

Modifiers: transient

Current bindings for each of the buttons, the length of this array should match the generated objects array.

CurrentlyBindingObject[edit]

Type: UIObject

Modifiers: transient

Which button we are currently rebinding.

CurrKeyBindData[edit]

Type: BindKeyData

Modifiers: transient

Key bind data to be passed from function to function and into message logic when attempting a key bind.

LocalizedFriendlyNames[edit]

Type: array<string>

Modifiers: transient

List of friendly label names for the actions being bound to.

MessageBoxReference[edit]

Type: UTUIScene_MessageBox

Modifiers: transient

Reference to the message box scene.

NonIntrusiveMessageBoxScene[edit]

Type: UIScene

Modifiers: transient

Global scene reference for non intrusive message box scene

NumButtons[edit]

Type: int

Modifiers: transient

Number of buttons to display for each key binding.

StoredBindings[edit]

Type: array<string>

Modifiers: transient

Stored bindings for each of the buttons, the length of this array should match the generated objects array. This array stores the starting values for CurrentBindings so we know if any changes were made.

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UTUIOptionList.WidgetEventComponent

No new values.

Structs[edit]

BindKeyData[edit]

Modifiers: native

Structure to store all pertinent data when in the process of binding a key.

name KeyName 
New key to bind to.
string Command 
Command to bind to the KeyName
PlayerInput PInput 
Player input object to bind in.
name PreviousBinding 
The previous key bound to.
bool bPromptForDuplicate 
Whether to prompt about duplicate binds or not.
bool bBindIsPrimary 
Whether the bind is the primary or secondary bind.

Functions[edit]

Native functions[edit]

GetBindKeyFromCommand[edit]

native function string GetBindKeyFromCommand (PlayerInput PInput, string Command, out int StartIdx)

Get the binding key using the command as the key and starting from a specific place in the list.

RefreshBindingLabels[edit]

native function RefreshBindingLabels ()

Refreshes the binding labels for all of the buttons.

RegenerateOptions[edit]

native function RegenerateOptions ()

Overrides: UTUIOptionList.RegenerateOptions

Generates widgets for all of the options.

RepositionOptions[edit]

native function RepositionOptions ()

Overrides: UTUIOptionList.RepositionOptions

Repositions all of the visible options.

Events[edit]

GetPlayerInput[edit]

event PlayerInput GetPlayerInput ()

Returns the player input object for the player that owns this widget.

PostInitialize[edit]

event PostInitialize ()

Overrides: UTUIOptionList.PostInitialize

Post initialize, binds callbacks for all of the generated options.

Other instance functions[edit]

AttemptKeyBind[edit]

function AttemptKeyBind ()

Attempts to bind the specified key to an action. Will prompt user of bind stomping.

BindingsHaveChanged[edit]

function bool BindingsHaveChanged ()

Whether any changes have been made to the bindings.

BindKey[edit]

function BindKey ()

Binds the specified key to an action.

CancelKeyBind[edit]

function CancelKeyBind ()

Cancels out of an attempted bind.

ClickedScrollZone[edit]

function ClickedScrollZone (UIScrollbar Sender, float PositionPerc, int PlayerIndex)

Overrides: UTUIOptionList.ClickedScrollZone

Handler for the vertical scrollbar's OnClickedScrollZone delegate. Scrolls the list by a full page (MaxVisibleItems).

Parameters:

  • Sender - the scrollbar that was clicked.
  • PositionPerc - a value from 0.0 - 1.0, representing the location of the click within the region between the increment and decrement buttons. Values closer to 0.0 means that the user clicked near the decrement button; values closer to 1.0 are nearer the increment button.
  • PlayerIndex - Player that performed the action that issued the event.

FinishBinding[edit]

function FinishBinding ()

Finishes the binding process by clearing variables and closing the bind key dialog.

FinishKeyDialog[edit]

function FinishKeyDialog (bool bPromptForBindStomp)

Closes the key dialog

GetFirstUnboundCrucialBind[edit]

function int GetFirstUnboundCrucialBind ()

Returns the index in the CrucialBindValues array of the first crucial bind not bound. Returns -1 if all is good.

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.

IsAlreadyBound[edit]

function bool IsAlreadyBound (name KeyName)

Whether or not a key is already bound to a command.

OnBindDialogSceneDeactivated[edit]

function OnBindDialogSceneDeactivated (UIScene DeactivatedScene)

Called when the bind dialog is closed.

OnBindKey_InputKey[edit]

function bool OnBindKey_InputKey (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.

OnBindStompWarning_Closed[edit]

function OnBindStompWarning_Closed ()

Callback for when the warning for stomping binds dialog has finished closing.

OnButton_InputKey[edit]

function bool OnButton_InputKey (const out UIRoot.InputEventParameters EventParms)

Callback for the mutator lists, captures the accept button before the mutators get to it.

OnClicked[edit]

function bool OnClicked (UIScreenObject Sender, int PlayerIndex)

Overrides: UIObject.OnClicked

Callback for all of the options we generated.

OnMenu_BindOverwrite_Confirm[edit]

function OnMenu_BindOverwrite_Confirm (UTUIScene_MessageBox MessageBox, int SelectedItem, int PlayerIndex)

Confirmation for rebinding of an already bound key message bos.

OnStompBindDialogSceneDeactivated[edit]

function OnStompBindDialogSceneDeactivated (UIScene DeactivatedScene)

Called when the bind dialog is closed.

ReloadDefaults[edit]

function ReloadDefaults ()

Reloads default values from the default INI (PC Only).

ScrollVertical[edit]

function bool ScrollVertical (UIScrollbar Sender, float PositionChange, optional bool bPositionMaxed)

Overrides: UTUIOptionList.ScrollVertical

Handler for vertical scrolling activity PositionChange should be a number of nudge values by which the slider was moved

Parameters:

  • Sender - the scrollbar that generated the event.
  • PositionChange - indicates how many items to scroll the list by
  • bPositionMaxed - indicates that the scrollbar's marker has reached its farthest available position, unused in this function

SelectNextItem[edit]

function bool SelectNextItem (optional bool bWrap, optional int PlayerIndex)

Overrides: UTUIOptionList.SelectNextItem

Selects the next item in the list.

SelectPreviousItem[edit]

function bool SelectPreviousItem (optional bool bWrap, optional int PlayerIndex)

Overrides: UTUIOptionList.SelectPreviousItem

Selects the previous item in the list.

SpawnBindStompWarningMessage[edit]

function SpawnBindStompWarningMessage ()

Spawns the message dialog so we can warn the player about stomping a key bind.

UnbindKey[edit]

function UnbindKey (name BindName)

Unbinds the specified key.