I am playing with OF with xcode and I was wondering how to change the items on the menu? Right now the main menu item just says openFrameworks and I was wondering if I could change that.
Also, is it possible to make it so people can’t maximize the application?
To change the app name so it shows up differently in the menu etc
go in the sidebar of the xcode project to where it says Targets
Reveal the openFrameworks target. Control-click on it and go to get info. In the build settings make sure you select either Debug or Release the scroll down till you see
Product Name - openFrameworks or
Product Name - openFrameworksDebug (depending on the mode you’re in)
Change that name to what you want to appear in the menu.
For disabling the maximize button - I am not sure about that - they could also resize the window from the bottom right corner as well.
You could instead put something in update that checks if the window has been resized and reshapes it back to the size you want.
int w = ofGetWidth();
int h = ofGetHeight();
if(w != 400 || h != 300) ofSetWindowShape(400, 300);
Here is some other info on doing kiosk type stuff on OS X - we use the SetSystemUIMode(kUIModeAllHidden,NULL); when the app goes fullscreen to hide the system menu and dock as mouse clicks can still pass through to them.
Might be useful! : )
theo’s solution will work for you - there are also low level options.
are you on mac, linux or windows?
most of what we do is at the glut level, so we are sort of limited by what glut can do, but some of the window stuff (preventing resize, maximization, etc) can be done at a lower level with pc specific code (ie, SetWindowLong), by grabbing the current window and then setting the window style. there might be linux and osX equivalents too… soon I’ll post some low level windows window hacking code in the extensions part of the forum.
thanks guys! I’m on os X and the solutions worked great.