Gah - a solution with more questions. – EntropicLqd

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

bCurrentlyBindingKey

Type: bool

Modifiers: transient

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

CrucialBindValues

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

Type: array<string>

Modifiers: transient

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

CurrentlyBindingObject

Type: UIObject

Modifiers: transient

Which button we are currently rebinding.

CurrKeyBindData

Type: BindKeyData

Modifiers: transient

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

LocalizedFriendlyNames

Type: array<string>

Modifiers: transient

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

MessageBoxReference

Type: UTUIScene_MessageBox

Modifiers: transient

Reference to the message box scene.

NonIntrusiveMessageBoxScene

Type: UIScene

Modifiers: transient

Global scene reference for non intrusive message box scene

NumButtons

Type: int

Modifiers: transient

Number of buttons to display for each key binding.

StoredBindings

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

WidgetEventComponent

Class: Engine.UIComp_Event

Inherits from: UTUIOptionList.WidgetEventComponent

No new values.

Structs

BindKeyData

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

Native functions

GetBindKeyFromCommand

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

native function RefreshBindingLabels ()

Refreshes the binding labels for all of the buttons.

RegenerateOptions

native function RegenerateOptions ()

Overrides: UTUIOptionList.RegenerateOptions

Generates widgets for all of the options.

RepositionOptions

native function RepositionOptions ()

Overrides: UTUIOptionList.RepositionOptions

Repositions all of the visible options.

Events

GetPlayerInput

event PlayerInput GetPlayerInput ()

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

PostInitialize

event PostInitialize ()

Overrides: UTUIOptionList.PostInitialize

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

Other instance functions

AttemptKeyBind

function AttemptKeyBind ()

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

BindingsHaveChanged

function bool BindingsHaveChanged ()

Whether any changes have been made to the bindings.

BindKey

function BindKey ()

Binds the specified key to an action.

CancelKeyBind

function CancelKeyBind ()

Cancels out of an attempted bind.

ClickedScrollZone

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

function FinishBinding ()

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

FinishKeyDialog

function FinishKeyDialog (bool bPromptForBindStomp)

Closes the key dialog

GetFirstUnboundCrucialBind

function int GetFirstUnboundCrucialBind ()

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

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.

IsAlreadyBound

function bool IsAlreadyBound (name KeyName)

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

OnBindDialogSceneDeactivated

function OnBindDialogSceneDeactivated (UIScene DeactivatedScene)

Called when the bind dialog is closed.

OnBindKey_InputKey

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

function OnBindStompWarning_Closed ()

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

OnButton_InputKey

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

function bool OnClicked (UIScreenObject Sender, int PlayerIndex)

Overrides: UIObject.OnClicked

Callback for all of the options we generated.

OnMenu_BindOverwrite_Confirm

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

Confirmation for rebinding of an already bound key message bos.

OnStompBindDialogSceneDeactivated

function OnStompBindDialogSceneDeactivated (UIScene DeactivatedScene)

Called when the bind dialog is closed.

ReloadDefaults

function ReloadDefaults ()

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

ScrollVertical

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

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

Overrides: UTUIOptionList.SelectNextItem

Selects the next item in the list.

SelectPreviousItem

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

Overrides: UTUIOptionList.SelectPreviousItem

Selects the previous item in the list.

SpawnBindStompWarningMessage

function SpawnBindStompWarningMessage ()

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

UnbindKey

function UnbindKey (name BindName)

Unbinds the specified key.