MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ on() [5/7]

Wiring & MayaFlux::Nexus::Wiring::on ( std::shared_ptr< Core::Window window,
IO::MouseButtons  button,
std::function< void(double, double)>  on_release 
)

Fire the entity on mouse button press and invoke a release callback on release.

Parameters
windowSource window.
buttonMouse button to listen for.
on_releaseCalled with cursor position when the button is released. Cancelled with the wiring.

Definition at line 74 of file Wiring.cpp.

76{
77 m_trigger = MouseTrigger {
78 .window = std::move(window),
79 .button = button,
80 .on_release = std::move(on_release)
81 };
82 return *this;
83}

References m_trigger, and MayaFlux::Nexus::Wiring::MouseTrigger::window.