ActionContext
Groups input-action bindings with a shared priority and modal state.
Behavior
ActionContext groups input-action bindings with a shared priority and modal state.
Summary
BindAction(actionName: string, functionToBind: (actionName: string, inputState: EnumItem, inputObject: InputObject) -> EnumItem?, createTouchButton: boolean?, args: ...EnumItem): ()Binds a named action to input codes within this context.
BindActionAtPriority(actionName: string, functionToBind: (actionName: string, inputState: EnumItem, inputObject: InputObject) -> EnumItem?, createTouchButton: boolean, priority: number | EnumItem, args: ...EnumItem): ()Binds a named action at an explicit priority.
Destroy(): ()Removes this context and its action bindings.
GetActionButton(actionName: string): ImageButton?Returns the touch button created for the named action, or nil if no button exists.
GetBoundActions(): { BoundActionInfo }Returns information about the registered action bindings.
SetActionDescription(actionName: string, description: string): ()Sets the description of a named action's touch button.
SetActionImage(actionName: string, image: string): ()Sets the image of a named action's touch button.
SetActionPosition(actionName: string, position: UDim2): ()Sets the position of a named action's touch button.
SetActionTitle(actionName: string, title: string): ()Sets the title of a named action's touch button.
UnbindAction(actionName: string): ()Removes the binding for the specified action.
UnbindAllActions(): ()Removes all bindings in this context.
Properties
Enabled
ActionContext.Enabled: booleanWhether this context dispatches its bound actions.
Modal
ActionContext.Modal: booleanWhether this context blocks dispatch to lower-priority contexts.
Name
ActionContext.Name: stringThe context name supplied when it was created.
Priority
ActionContext.Priority: numberThe context priority used when dispatching input.
Methods
BindAction
ActionContext:BindAction(actionName: string, functionToBind: (actionName: string, inputState: EnumItem, inputObject: InputObject) -> EnumItem?, createTouchButton: boolean?, args: ...EnumItem): ()Binds a named action to input codes within this context.
BindActionAtPriority
ActionContext:BindActionAtPriority(actionName: string, functionToBind: (actionName: string, inputState: EnumItem, inputObject: InputObject) -> EnumItem?, createTouchButton: boolean, priority: number | EnumItem, args: ...EnumItem): ()Binds a named action at an explicit priority. The callback receives the action name, input state, and InputObject. Return Enum.ContextActionResult.Sink to consume the input or Pass to continue dispatch.
Destroy
ActionContext:Destroy(): ()Removes this context and its action bindings.
GetActionButton
ActionContext:GetActionButton(actionName: string): ImageButton?Returns the touch button created for the named action, or nil if no button exists.
GetBoundActions
ActionContext:GetBoundActions(): { BoundActionInfo }Returns information about the registered action bindings.
SetActionDescription
ActionContext:SetActionDescription(actionName: string, description: string): ()Sets the description of a named action's touch button.
SetActionImage
ActionContext:SetActionImage(actionName: string, image: string): ()Sets the image of a named action's touch button.
SetActionPosition
ActionContext:SetActionPosition(actionName: string, position: UDim2): ()Sets the position of a named action's touch button.
SetActionTitle
ActionContext:SetActionTitle(actionName: string, title: string): ()Sets the title of a named action's touch button.
UnbindAction
ActionContext:UnbindAction(actionName: string): ()Removes the binding for the specified action.
UnbindAllActions
ActionContext:UnbindAllActions(): ()Removes all bindings in this context.
Operators
__eq · __tostring · __type