Hi all,
I'm working on a drawing application that's intended to have several popup windows in which I can configure the brushes.
You can find a rough sketch of the drawing tool
here.
I've created a Window object which, upon creation, initiates a bunch of gui elements (using the fantastic controlP5 library) and draws a rect() as a frame.
After I've done setting the necessary parameters I want the Window to disappear again. Unfortunately I've run into two problems with that:
1. Obviously the rect() is drawn to the stage, but I don't want it to. It should disappear, revealing whatever it covered before. The only way I can think of around this, is to save and reload the underlying pixels after the window is gone But that feels a wrong thing to do
2. It's a snap to create a button with controlP5:
Code:
controlP5.addButton("button",10,100,160,80,20);
Unfortunately once it's created I can't seem to get rid of it again. It will constantly draw on top of everything else. Is there a way to delete created buttons/radios/sliders again? I stumbled upon remove() in the documentation, but I don't seems to get it to work. Andi?
True, I could use a controlP5 controller window for my popups, but I'd rather try without, because it wouldn't fit the overall look and feel of the application.
cheers,
Greg