tim
April 16, 2009, 10:05am
#1
Hi all,
I’m having trouble getting a response from the resized() event that has been added to testApp in OF 0.06. A simple printf command doesn’t show up in the console:
void testApp::resized(int w, int h){
printf("resized! %i, %i\n", w, h);
Anyone has a clue…?
btw. I’m trying on windows - codeblocks (on xcode it seems fine though)
cheers,
-Tim
arturo
April 16, 2009, 11:29am
#2
Hey tim
in which example do you have that resized method? in the end we renamed to windowResized instead of resized.
tim
April 16, 2009, 1:03pm
#3
Hey Arturo,
I was working from the allAddonsExample, but from a quick browse through the different examples it seems to me quite a few use the ‘resized’ method instead of ‘windowResized’.
I made a quick list (this is for of_preRelease_v0.06_win32_cb_FAT):
examples\
advancedEventsExample - resized
advancedGraphicsExample - resized
audioInputExample - resized
audioOutputExample - resized
emptyExample - resized
eventsExample - resized
firmataExample - windowResized
fontsExample - resized
fontsShapesExample - no method
graphicsExample - resized
imageLoaderExample - resized
imageSaverExample - resized
movieGrabberExample - resized
moviePlayerExample - resized
polygonExample - resized
serialExample - resized
soundPlayerExample - resized
soundPlayerFFTExample - resized
textureExample - resized
textureScreengrabExample - resized
windowExample - resized
addonsExamples\
3DModelLoaderExample - no method
allAddonsExample - resized
dirListExample - windowResized
networkTcpClientExample - windowResized
networkTcpServerExample - windowResized
networkUdpReceiverExample - windowResized
networkUdpSenderExample - windowResized
opencvExample - windowResized
oscReceiverExample - windowResized
oscSenderExample - windowResized
threadExample - windowResized
vectorGraphicsExample - windowResized
vectorMathExample - windowResized
vectorMathExample - windowResized
xmlSettingsExample - windowResized
HTH
And thanks for pointing out it should be windowResized, works perfect!
-tim
arturo
April 16, 2009, 3:29pm
#4
hey tim, thanks so much for the list!
Do any examples actually call the WindowResized method and use the arguments(w,h) to resize the window?
zach
February 11, 2017, 7:41pm
#6
windowResized gets called if the window is resized (ie, like how mousePressed() gets called if the mouse is pressed).
to resize the window, use ofSetWindowShape() – there’s an example in examples/utils/windowExample