66 bool m_limitDragToRect;
118 inline void lock(
bool x,
bool y)
130 m_limitDragToRect = b;
146 virtual void onPointerUp(
int pointerId,
float pointerX,
float pointerY);
This is the base object class from which other GUIs inherit. It's an empty GUI and can contain child ...
Definition CGUIElement.h:51
CUIBase(CUIContainer *container, CGUIElement *element)
Constructor.
Top-level UI container and event router.
Definition CUIContainer.h:59
void setBounds(const core::rectf &r)
Set the rectangular bounds used when limitDragToRect(true) is active.
Definition CUIDraggable.h:137
virtual void onPointerMove(int pointerId, float pointerX, float pointerY)
Called when pointer moves while over or dragging the element.
std::function< void(CUIDraggable *, float posX, float posY)> OnEndDrag
Callback invoked when the drag operation ends.
Definition CUIDraggable.h:98
void lock(bool x, bool y)
Lock/unlock movement on each axis.
Definition CUIDraggable.h:118
virtual void onBeginDrag()
Internal hook invoked when a drag begins.
void limitDragToRect(bool b)
Enable or disable rectangular bounds for dragging.
Definition CUIDraggable.h:128
CUIDraggable(CUIContainer *container, CGUIElement *element)
Construct a draggable wrapper for a GUI element.
std::function< void(CUIDraggable *, float posX, float posY)> OnDrag
Callback invoked while dragging (on pointer move).
Definition CUIDraggable.h:88
virtual void onPointerDown(int pointerId, float pointerX, float pointerY)
Called when pointer is pressed down on the element.
std::function< void(CUIDraggable *, float posX, float posY)> OnBeginDrag
Callback invoked when a drag operation begins.
Definition CUIDraggable.h:78
virtual void updateDrag()
Apply pointer movement to the underlying element.
virtual void onPointerUp(int pointerId, float pointerX, float pointerY)
Called when pointer is released over the element.
virtual void onEndDrag()
Internal hook invoked when a drag ends.
Classes used to build the User Interface (UI).
Definition CAlphaMotion.h:32
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
vector2d< f32 > vector2df
Typedef for f32 2d vector.
Definition vector2d.h:323
rect< f32 > rectf
Rectangle with float values.
Definition rect.h:271