Download Now

    Reference TMouse

    Declared in Codebot.Hardware.pas on line 439

    TMouse holds the state of the mouse at the last scan. Use the Mouse function to get the one instance.
      TMouse = class
      public
        destructor Destroy; override;
        { The buttons which are held down }
        property Buttons: TSceneButtons read GetButtons;
        { True while a button is held down. buttonNone is never down. }
        property Button[Index: TSceneButton]: Boolean read GetButton; default;
        { True if a button went down since the frame before }
        property Pressed[Index: TSceneButton]: Boolean read GetPressed;
        { True if a button went up since the frame before }
        property Released[Index: TSceneButton]: Boolean read GetReleased;
        { The position of the mouse inside the window with the mouse focus, in the
          units of the window before any scaling of the scene }
        property X: Integer read GetX;
        property Y: Integer read GetY;
        { The distance the mouse moved since the frame before. This keeps changing
          while the mouse is captured. }
        property XDelta: Integer read GetXDelta;
        property YDelta: Integer read GetYDelta;
        { A captured mouse has its cursor hidden and is kept inside the window, and
          only XDelta and YDelta report its movement }
        property Captured: Boolean read GetCaptured write SetCaptured;
        { Show or hide the mouse cursor }
        property Visible: Boolean read GetVisible write SetVisible;
        { The cursor shown while the mouse is over the scene. Setting it to
          cursorNone hides the cursor and to any other shows it. }
        property Cursor: TMouseCursor read FCursor write SetCursor;
      end;

    See also