Oxygine  1
2g game engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oxygine::Draggable Class Reference

Public Member Functions

void init (Actor *actor)
 
void start (const PointerState *pointer, Actor *actor, const Vector2 &localCenter)
 
void destroy ()
 
ActorgetDragClient () const
 
const RectFgetDragBounds () const
 
const Vector2getClientPos () const
 
bool getDragEnabled () const
 
bool isDragging () const
 
void setDragEnabled (bool en)
 
void setDragBounds (const RectF &bounds)
 
void setDragClient (Actor *actor)
 
void setIgnoreTouchUp (bool ignore)
 
void snapClient2Bounds ()
 

Protected Member Functions

ActorgetClient ()
 
void onEvent (Event *event)
 
void startDrag (const Vector2 &localPos)
 
void onDrag (TouchEvent *es)
 
void onMove (const Vector2 &position)
 

Protected Attributes

Actor_dragClient
 
Actor_actor
 
timeMS _startTm
 
bool _singleDrag
 
RectF _bounds
 
Vector2 _dragPos
 
Vector2 _clientPos
 
bool _clientIsParent
 
bool _pressed
 
bool _dragEnabled
 
bool _ignoreTouchUp
 

Member Function Documentation

◆ setDragBounds()

void oxygine::Draggable::setDragBounds ( const RectF bounds)

sets bounds position for dragged actor

◆ setDragClient()

void oxygine::Draggable::setDragClient ( Actor actor)

sets destination drag client. Default value is Actor attached to DragHandler


The documentation for this class was generated from the following file: