PluginMouse
The PluginMouse object gives Plugins access to the mouse. It works like the Mouse object and can be obtained using the plugin Plugin:GetMouse() method.
Note the PluginMouse can only be used when the plugin has been activated using Plugin:Activate().
In addition to the functions from the Mouse object, the PluginMouse includes the PluginMouse.DragEnter function which keeps track of items being selected while the mouse is dragging.
For more information on how to use mouse objects, see the Mouse page.
코드 샘플
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에서 상속되었습니다The CFrame of the mouse's position in 3D space.
The content ID of the image used as the Mouse icon.
A CFrame positioned at the Workspace.CurrentCamera and oriented toward the mouse's 3D position.
The object in 3D space the mouse is pointing to.
- 병렬 읽기
Determines an object (and its descendants) to be ignored when determining Mouse.Hit and Mouse.Target.
- 읽기 전용복제되지 않음병렬 읽기
Indicates the Enum.NormalId of the BasePart surface at which the mouse is pointing.
A Ray directed towards the mouse's world position, originating from the Workspace.CurrentCamera world position.
Describes the width of the game window in pixels.
Describes the height of the game window in pixels.
Describes the X (horizontal) component of the mouse's position on the screen.
Describes the Y (vertical) component of the mouse's screen position.
이벤트
- 플러그인 보안
Fired when Instances are being selected while the mouse is dragging.
Fired when the left mouse button is pressed.
Fires when the left mouse button is released.
Fires when the right mouse button is pressed.
Fired when the right mouse button is released.
Fired during every heartbeat that the mouse isn't being passed to another mouse event.
Fired when the mouse is moved.
Fires when the mouse wheel is scrolled backwards.
Fires when the mouse wheel is scrolled forwards.
속성
메서드
이벤트
DragEnter
Fired when Instances are being selected while the mouse is dragging.