Thanks to GoToLoop and others who discussed it here and on the earlier forums, I know I can make a sketch with more than one window like this:
def setup():
size(200, 300)
second_window = OtherWindow()
def draw():
background(0)
ellipse(mouseX, mouseY, 10, 10)
class OtherWindow(PApplet):
def __init__(self):
switches = ('--sketch-path=' + sketchPath(), '')
PApplet.runSketch(switches, self)
def settings(self):
self.size(300, 200)
def draw(self):
self.background(255)
self.fill(0)
self.rect(self.mouseX, self.mouseY, 10, 10)
I would like to set the title of my second window (the defaut is an ugly "_main_$OtherWindow$"
), but I can’t find the surface.setTitle(" ") method for it.
Any clues?