Cannot recreate the crash I had last night [Did not save the code and was tired so cannot recall...]
But this works even if they click on maximize...
It works so well for the requirements you asked for help with, check if Matrix1Utils has a similar function for the ones marked below...
REM Code By: MrValentine
WIDTH = 640 ` YOU CAN LOAD THIS DYNAMICALLY AS WELL MAYBE FROM A SETUP FILE
HEIGHT = 480 ` YOU CAN LOAD THIS DYNAMICALLY AS WELL MAYBE FROM A SETUP FILE
POSX = WINDOW X() ` REQUIRES STYX OR ANOTHER METHOD
POSY = WINDOW Y() ` REQUIRES STYX OR ANOTHER METHOD
SET WINDOW LAYOUT 3,0,0
SYNC ON
SYNC RATE 60
AUTOCAM OFF
MAKE OBJECT CUBE 1, 10
POSITION OBJECT 1, 0,0,0
POSITION CAMERA 0, 0,0,-200
POINT CAMERA 0, 0,0,0
DO
IF WINDOW STATE() = 2 ` REQUIRES STYX OR ANOTHER METHOD
SYNC
ELSE
IF WINDOW MOVED() ` REQUIRES STYX OR ANOTHER METHOD
SET WINDOW POSITION POSX, POSY
ENDIF
IF WINDOW RESIZED() ` REQUIRES STYX OR ANOTHER METHOD
SET WINDOW SIZE WIDTH,HEIGHT
ENDIF
ENDIF
XROTATE OBJECT 1, OBJECT ANGLE X(1)+1
YROTATE OBJECT 1, OBJECT ANGLE Y(1)+1
SYNC
LOOP
END
Do you know what Matrix1Utils is?
EDIT
Removed space in code