PluginMouse

Mostrar obsoleto
não criável

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.

Amostras de código

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)

Resumo

Propriedades

Propriedades herdados de Mouse
  • somente leitura
    não replicado
    ler parallel

    The CFrame of the mouse's position in 3D space.

  • ler parallel

    The content ID of the image used as the Mouse icon.

  • somente leitura
    não replicado
    ler parallel

    A CFrame positioned at the Workspace.CurrentCamera and oriented toward the mouse's 3D position.

  • somente leitura
    não replicado
    ler parallel

    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.

  • somente leitura
    não replicado
    ler parallel

    Indicates the Enum.NormalId of the BasePart surface at which the mouse is pointing.

  • somente leitura
    não replicado
    ler parallel

    A Ray directed towards the mouse's world position, originating from the Workspace.CurrentCamera world position.

  • somente leitura
    não replicado
    ler parallel

    Describes the width of the game window in pixels.

  • somente leitura
    não replicado
    ler parallel

    Describes the height of the game window in pixels.

  • somente leitura
    não replicado
    ler parallel

    Describes the X (horizontal) component of the mouse's position on the screen.

  • somente leitura
    não replicado
    ler parallel

    Describes the Y (vertical) component of the mouse's screen position.

Eventos

Eventos herdados de Mouse

Propriedades

Métodos

Eventos

DragEnter

segurança do plugin

Fired when Instances are being selected while the mouse is dragging.

Parâmetros

instances: Objects