Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    MouseDeviceBase Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll

    Base class for mouse devices, implements some common functionality of IMouseDevice, inherits from PointerDeviceBase

    System.Object → PointerDeviceBase → MouseDeviceBase
    Derived from MouseDeviceBase: MouseSimulated

    public abstract class MouseDeviceBase : PointerDeviceBase, IMouseDevice, IPointerDevice, IInputDevice
    Name Description
    Constructors
    MouseDeviceBase()
    Fields
    MouseState
    Properties
    Delta
    DownButtons
    IsPositionLocked
    Position
    PressedButtons
    ReleasedButtons
    Methods
    LockPosition(Boolean)
    SetPosition(Vector2)
    UnlockPosition()
    Update(List<InputEvent>)
    | Improve this Doc View Source

    Constructors


    MouseDeviceBase()

    protected MouseDeviceBase()
    | Improve this Doc View Source

    Fields


    MouseState

    protected MouseDeviceState MouseState
    Field Value
    Type Description
    MouseDeviceState
    | Improve this Doc View Source

    Properties


    Delta

    public Vector2 Delta { get; }
    Property Value
    Type Description
    Vector2

    DownButtons

    public IReadOnlySet<MouseButton> DownButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<MouseButton>

    IsPositionLocked

    public abstract bool IsPositionLocked { get; }
    Property Value
    Type Description
    System.Boolean

    Position

    public Vector2 Position { get; }
    Property Value
    Type Description
    Vector2

    PressedButtons

    public IReadOnlySet<MouseButton> PressedButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<MouseButton>

    ReleasedButtons

    public IReadOnlySet<MouseButton> ReleasedButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<MouseButton>
    | Improve this Doc View Source

    Methods


    LockPosition(Boolean)

    public abstract void LockPosition(bool forceCenter = false)
    Parameters
    Type Name Description
    System.Boolean forceCenter

    SetPosition(Vector2)

    public abstract void SetPosition(Vector2 normalizedPosition)
    Parameters
    Type Name Description
    Vector2 normalizedPosition

    UnlockPosition()

    public abstract void UnlockPosition()

    Update(List<InputEvent>)

    public override void Update(List<InputEvent> inputEvents)
    Parameters
    Type Name Description
    System.Collections.Generic.List<InputEvent> inputEvents
    Overrides
    PointerDeviceBase.Update(List<InputEvent>)

    Inherited Members

    PointerDeviceBase.PointerState
    PointerDeviceBase.SurfaceSize
    PointerDeviceBase.SurfaceAspectRatio
    PointerDeviceBase.PressedPointers
    PointerDeviceBase.ReleasedPointers
    PointerDeviceBase.DownPointers
    PointerDeviceBase.SurfaceSizeChanged
    PointerDeviceBase.Priority
    PointerDeviceBase.Name
    PointerDeviceBase.Id
    PointerDeviceBase.Source
    PointerDeviceBase.SetSurfaceSize(Vector2)
    PointerDeviceBase.Normalize(Vector2)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    MouseDeviceExtensions.IsButtonPressed(IMouseDevice, MouseButton)
    MouseDeviceExtensions.IsButtonReleased(IMouseDevice, MouseButton)
    MouseDeviceExtensions.IsButtonDown(IMouseDevice, MouseButton)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation