class MAGES::Interaction::UI::ButtonModel

Overview

class ButtonModel: public MAGES::Interaction::UI::ButtonBehaviour
{
public:
    // fields

    Vector2 PressPosition;
    GameObject PointerPress;
    GameObject RawPointerPress;
    RaycastResult PointerPressRaycast;
    float ClickTime;
    bool Dragging;
    GameObject PointerDrag;

    // methods

    void Reset();
    void CopyToEventData(PointerEventData eventData);
    void CopyFromEventData(PointerEventData eventData);
};

Inherited Members

public:
    // properties

    bool ClickedOnSameGameObject;
    bool IsPressed;
    float PressTime;
    bool WasPressedThisFrame;
    bool WasReleasedThisFrame;

    // methods

    void OnEndOfFrame();

Detailed Documentation

Fields

Vector2 PressPosition

The position of the press.

GameObject PointerPress

The gameobject that received the OnPointerDown.

GameObject RawPointerPress

The gameobject that the pointer was pressed on even if it was not capable of receiving the OnPointerDown event.

RaycastResult PointerPressRaycast

Raycastresult associated with the pointer press.

float ClickTime

The last time a click event was sent. Used for double click.

bool Dragging

Whether a drag is in progress.

GameObject PointerDrag

The gameobject that is receiving OnDrag.