PluginMouse

顯示已棄用項目

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

無法建立

PluginMouse 對象提供 Plugins 對滑鼠標的存取。它與 Mouse 對象相同,可以使用 plugin Plugin:GetMouse() 方式獲得。

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

Mouse 對物件的基礎上,PluginMouse 包括 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