Resolution change & disable window scaler? (SOLVED)
by Beef Churger · in Torque 2D Beginner · 06/12/2014 (2:08 pm) · 2 replies
Hi,
I'm wondering if there is a callback in TorqueScript when the resolution is changed?
I would also like to know how to disable the click-drag resize option for the window (c++ i'm guessing).
Thanks!
I'm wondering if there is a callback in TorqueScript when the resolution is changed?
I would also like to know how to disable the click-drag resize option for the window (c++ i'm guessing).
Thanks!
Associate Simon Love
Resolution Change Callback
Every time the engine calls setscreenmode (as it does in the initializecanvas script function) the engine executes some C++ code and then calls the resetCanvas(); script function.This function already exists in AppCore/scripts/canvas.cs and can easily be overriden or added to.
How to disable Window Resizing
Yes it's in C++ but requires a tiny tiny change; if you've never dared touch the C++ code, this is literally the simplest change you could hope for.Assuming you are on Windows, in engine/source/platformWind32/winOGLVideo.cc
Change the last parameter in the following line to false
I've just tested it, it prevent the resizing handles to appear.
On OSX, I have no idea; should be relatively similar.
If you'd like to completely control the behavior/look of your game window under Windows, I suggets reading the MSDN reference