I'm new to juce and trying to learn it by porting over an old Rubik cube program I wrote several years ago using OpenGL and SDL. Following the JuceDemo I was able to render my cube's fine and was able to rotate the whole cube.
I need help on capturing the mouse events when a particular face in the cube is clicked. When the mouse is dragged, either in the x, or y, direction, I only want to rotate the row/col that was selected. I have the matrix logic on what needs to be done, just not sure how to capture the mouse event.
My code is structured like:
Face.cpp - Handles drawing the faces of the cubes.
Cube.cpp - Handles the creation and positioning of the faces.
OpenGLCanvas.cpp - Component : OpenGLRenderer - Handles the GLRendering and mouse event for the whole cube.
What do I need to do to Face.cpp and Cube.cpp to have them capture mouse events as well?