I mean there are many ways to do this, in this example I went with the most simple and straight forward way.
1)I declare the second ofApp class UNDER the first of App.
this way the first ofApp window can have a pointer of the second window (in my example I call the window mainWindow because is a bigger window but in reality it’s the secondary
and the second window can have a pointer of the main ofApp
like:
ofApp * _sms;
in the main ofApp:
shared_ptr<ofAppBaseWindow> mainWindow;//i am really the second window
ofGLFWWindowSettings settings;
Notice that I also have a “ofGLFWWindowSettings” thingie over there
This is becaue in main() I want to pass pointers of those two things so I can then pass them to the second window.
settings_menu_sms_schedule_is_open is just an extern bool, I call it false when window is not open and true if it is, most people hate extern bools. you might use a shared pointer etc…