Show / Hide Table of Contents

    Interface IDraggableComponent

    Adds the ability for an entity to be dragged on the screen with the mouse/touch.

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    [RequiredComponent(typeof(ITranslateComponent), true)]
    [RequiredComponent(typeof(IDrawableInfoComponent), false)]
    [RequiredComponent(typeof(IUIEvents), true)]
    public interface IDraggableComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    DragMaxX

    Allows to limit the dragging to a maximum x (as room coordinates after adjusting for the viewport).

    Declaration
    float? DragMaxX { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Single>

    The drag maximum x.

    | Improve this Doc View Source

    DragMaxY

    Allows to limit the dragging to a maximum y (as room coordinates after adjusting for the viewport).

    Declaration
    float? DragMaxY { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Single>

    The drag maximum y.

    | Improve this Doc View Source

    DragMinX

    Allows to limit the dragging to a minimum x (as room coordinates after adjusting for the viewport).

    Declaration
    float? DragMinX { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Single>

    The drag minimum x.

    | Improve this Doc View Source

    DragMinY

    Allows to limit the dragging to a minimum y (as room coordinates after adjusting for the viewport).

    Declaration
    float? DragMinY { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Single>

    The drag minimum y.

    | Improve this Doc View Source

    IsCurrentlyDragged

    Gets a value indicating whether this entity is currently dragged.

    Declaration
    bool IsCurrentlyDragged { get; }
    Property Value
    Type Description
    System.Boolean

    true if is currently dragged; otherwise, false.

    | Improve this Doc View Source

    IsDragEnabled

    Gets or sets a value indicating whether this entity can be dragged now.

    Declaration
    bool IsDragEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if is drag enabled; otherwise, false.

    | Improve this Doc View Source

    OnDragStart

    Declaration
    IBlockingEvent<(float dragStartX, float dragStartY)> OnDragStart { get; }
    Property Value
    Type Description
    IBlockingEvent<System.ValueTuple<System.Single, System.Single>>

    Methods

    | Improve this Doc View Source

    SimulateMouseDown(MouseButtonEventArgs)

    Simulates a mouse down event. This can be useful if you add the draggable component after the mouse was already pressed down.

    Declaration
    void SimulateMouseDown(MouseButtonEventArgs args)
    Parameters
    Type Name Description
    MouseButtonEventArgs args

    Arguments.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX