OnTouchUp||doc136699

September 20, 2022

Format

local event = Window:GetEvent("OnTouchUp")

Describe

An event is triggered when the target control is touched and lifted.

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("OnTouchUp")
event:Bind(function(window, pos, touchIndex)
    print("touch up window!", window.name, pos, touchIndex)
end)