Part of integrating controlP5 in the new version of the ANAR+ library, I would like to be able to fit the control window to the number of sliders created by the users.
Since i cannot infer in advance the number of sliders in the code (it may even be dynamic), I would like to be able to fit the window to the current number of sliders. Or to let the user resize itself or to be able to scroll down if the number is too large.
I have tried
controlWindow.papplet().frame.setResizable(true);
Which indeed allow resize but the canvas do not get redrawn.
Similarly
Dimension dim = controlWindow.papplet().frame.getSize(); dim.setSize(dim.getWidth()+10, dim.getHeight()+200); controlWindow.papplet().frame.setSize(dim);
indeed does the job of resizing the window, but the redraw is still missing.
It seems like I am not far away but cannot see the path...
another small question: How can I set the focus on the original window ??
Part of upgrading the ANAR+ library to v2.0, I would like to have a little damping (smoothing) effect on the camera when using proscene. That is the mouse update should define a target view which is then reached by interpolation. For instance with
myCamera.interpolateTo(Frame f)
Since proscene has a lot of interpolation capabilities, I suspect it may be doable. The only thing which is unclear to me is to construct a target Frame from the mouse interactions without having the camera move. Looking at the example and the javadoc did not give me definitive answers.
Maybe having two cameras one detached from p5 camera and the other attached and doing the interpolation, using
attachedToP5Camera();
detachFromP5Camera();
But how is it possible to specify which Camera gets the mouse interaction?