PluginMouse

Mostrar obsoleto
no creable

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.

Muestras 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)

Resumen

Propiedades

Propiedades heredados de Mouse
  • solo lectura
    no replicado
    leer paralelo

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

  • leer paralelo

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

  • solo lectura
    no replicado
    leer paralelo

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

  • solo lectura
    no replicado
    leer paralelo

    The object in 3D space the mouse is pointing to.

  • leer paralelo

    Determines an object (and its descendants) to be ignored when determining Mouse.Hit and Mouse.Target.

  • solo lectura
    no replicado
    leer paralelo

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

  • solo lectura
    no replicado
    leer paralelo

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

  • solo lectura
    no replicado
    leer paralelo

    Describes the width of the game window in pixels.

  • solo lectura
    no replicado
    leer paralelo

    Describes the height of the game window in pixels.

  • solo lectura
    no replicado
    leer paralelo

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

  • solo lectura
    no replicado
    leer paralelo

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

Eventos

Eventos heredados de Mouse

Propiedades

Métodos

Eventos

DragEnter

seguridad del plugin

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

Parámetros

instances: Objects