类型 字符串 事件 鼠标 修订 版本 2024.3703 关键词 鼠标,类型
一个字符串,用于标识正在发生的鼠标事件的类型。可以是以下值之一:
"down"
— 表示按下鼠标按钮。"up"
— 表示释放鼠标按钮。"move"
— 表示鼠标在屏幕上移动。"drag"
— 表示在按下鼠标按钮的同时鼠标在屏幕上移动(拖动)。"scroll"
— 表示鼠标沿 X 轴或 Y 轴滚动。-- Called when a mouse event has been received. local function onMouseEvent( event ) print( "Mouse event type is: " .. event.type ) end -- Add the mouse event listener. Runtime:addEventListener( "mouse", onMouseEvent )