cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.34k stars 944 forks source link

Changing CameraUi to make the mouse events virtual #2280

Open odbee opened 2 years ago

odbee commented 2 years ago

Hey, I've been struggling with adding mouse events while using CameraUi since they overwrite the mouse events apparent in the class. My solution was forking the CameraUi script and making all mouse related functions virtual. That way I could just make a derived class and override the standard mouse events within CameraUi without having to setup everything else. So I'm wondering why this couldn't be the standard since it shouldn't break anything and would just help with using the program.

axjxwright commented 2 years ago

You don't need to have the CameraUi add mouse events, you can just call CameraUi::mouseDown etc from your own mouse handlers.