OnTouchMove||doc136700

September 20, 2022

Format

local event = Window:GetEvent("OnTouchMove")

Describe

This event is triggered when the finger moves during the process of being touched in the target control.

Callback function parameters

Type name introduce
Window window current window
Vector2 pos Screen based touch coordinates
int touchIndex The touch point index of touch is used to determine the number of touch points

Code example

-- Create a Image widget
local window = UI:CreateGUIWidget(Enum.WidgetType.Image)
window.Parent = UI.Root

local event = window:GetEvent("OnTouchMove")
event:Bind(function(window, pos, touchIndex)
    print("touch move window!", window.name, pos, touchIndex)
end)