Files
rive-cpp/include/rive/pointer_event.hpp
philter ac160033db Prevent pointer events when interacting with scroll view (#10251) 40592c7963
Currently, when items are inside a scroll view, when the scroll view is dragged and released, the item's click event will still trigger its listener if the same item is hovered. This adds a way to disable pointer events. In this implementation, when a scroll drag begins, we set the GestureClickPhase to disabled which prevents clicks from being captured.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-05 17:50:48 +00:00

27 lines
459 B
C++

#ifndef _RIVE_POINTER_EVENT_HPP_
#define _RIVE_POINTER_EVENT_HPP_
#include "rive/math/vec2d.hpp"
namespace rive
{
enum class PointerEventType
{
down, // The button has gone from up to down
move, // The pointer's position has changed
up, // The button has gone from down to up
};
struct PointerEvent
{
PointerEventType m_Type;
Vec2D m_Position;
int m_PointerIndex;
// add more fields as needed
};
} // namespace rive
#endif