PluginMouse

顯示已棄用項目

*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡

無法建立

插件滑鼠對象提供Plugins存取滑鼠。它像 Mouse 對象一樣運作,可以使用插件 Plugin:GetMouse() 方法獲得。

注意,只有在使用 Plugin:Activate() 啟用插件時,PluginMouse 才能使用。

除了來自 Mouse 物件象的功能外,插件滑鼠包括跟蹤鼠標拖動時選擇項目的 PluginMouse.DragEnter 功能。

有關如何使用滑鼠對象的更多資訊,請參閱 Mouse 頁面。

範例程式碼

The code below demonstrates how the PluginMouse object can be obtained and used in a plugin. To use this code, paste it into a Script save that script to the local Plugins Folder using right click, save to file. The plugins folder can be found in the Plugins tab in the Roblox Studio toolbar.

PluginMouse Get

plugin:Activate(false) -- gain non exclusive access to the mouse
local mouse = plugin:GetMouse()
local function button1Down()
print("Left mouse click")
end
mouse.Button1Down:Connect(button1Down)

概要

屬性

屬性 繼承自 Mouse

活動

活動 繼承自 Mouse

屬性

方法

活動

DragEnter

外掛程式安全性

在滑鼠拖動時,選擇實例時發射。

參數

instances: Instances