Search Results for

    Show / Hide Table of Contents

    Class Mouse

    Represents a single hardware mouse device. Used by the Input to report raw mouse input events.

    Inheritance
    System.Object
    Object
    InputDevice
    Mouse
    Inherited Members
    InputDevice.Name
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class Mouse : InputDevice
    Remarks

    The mouse device position is in screen-space (not game client window space).

    Constructors

    Mouse()

    Initializes a new instance of the Mouse.

    Declaration
    public Mouse()

    Properties

    IsAnyButtonDown

    Checks if any mouse button is currently pressed.

    Declaration
    [Unmanaged]
    public bool IsAnyButtonDown { get; }
    Property Value
    System.Boolean

    Position

    Gets the position of the mouse in the screen-space coordinates.

    Declaration
    [Unmanaged]
    public Float2 Position { get; }
    Property Value
    Float2

    PositionDelta

    Gets the delta position of the mouse in the screen-space coordinates.

    Declaration
    [Unmanaged]
    public Float2 PositionDelta { get; }
    Property Value
    Float2

    ScrollDelta

    Gets the mouse wheel change during the last frame.

    Declaration
    [Unmanaged]
    public float ScrollDelta { get; }
    Property Value
    System.Single

    Methods

    GetButton(MouseButton)

    Gets the mouse button state (true if being pressed during the current frame).

    Declaration
    [Unmanaged]
    public bool GetButton(MouseButton button)
    Parameters
    MouseButton button

    Mouse button to check

    Returns
    System.Boolean

    True if user holds down the button, otherwise false.

    GetButtonDown(MouseButton)

    Gets the mouse button down state (true if was pressed during the current frame).

    Declaration
    [Unmanaged]
    public bool GetButtonDown(MouseButton button)
    Parameters
    MouseButton button

    Mouse button to check

    Returns
    System.Boolean

    True if user starts pressing down the button, otherwise false.

    GetButtonUp(MouseButton)

    Gets the mouse button up state (true if was released during the current frame).

    Declaration
    [Unmanaged]
    public bool GetButtonUp(MouseButton button)
    Parameters
    MouseButton button

    Mouse button to check

    Returns
    System.Boolean

    True if user releases the button, otherwise false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat