Topic: How to set a minimum window size to a resizeable window?
Hello, like the title of this thread already said I want to set the minimal allowed size of a resizeable window.
Here some little code to show the context in which I want the window minimum size:
SuperStrict
Import irrlicht.core
Local xmax:Int = 800
Local ymax:Int = 600
Local device:IrrlichtDevice = IrrlichtDevice.Create(EDT_DIRECT3D9, _DIMENSION2DI(xmax, ymax), 32, False, False, True)
Local Driver:IVideoDriver = device.getVideoDriver()
Local scmgr:ISceneManager = device.getSceneManager()
device.setResizable(True)
Local cam:ICameraSceneNode = scmgr.addCameraSceneNode()
cam.SetPosition(_VECTOR3DF(0, 0, -20))
Local cube:IMeshSceneNode = scmgr.addCubeSceneNode()
Local LIGHT:ILightSceneNode = scmgr.addLightSceneNode(, _VECTOR3DF(-5, 10, -5))
scmgr.setAmbientLight(_SCOLORF(0.1, 0.1, 0.1))
scmgr.setActiveCamera(cam)
While(device.run())
Local rot:Vector3df = cube.GetRotation()
rot.PlusEq(_VECTOR3DF(1, 1, 1))
cube.SetRotation(rot)
xmax = Driver.getScreenSize().getWidth()
ymax = Driver.getScreenSize().getHeight()
cam.setAspectRatio(xmax / Float(ymax))
Driver.BeginScene()
scmgr.drawAll()
Driver.EndScene()
device.setWindowCaption(Driver.getFPS() + " FPS, close me by pressing <Alt>+<F4>")
Wend
device.drop()
For the program I'm writing it's important that the window can't be smaller than 400*300 or sth. like this. I didn't find anything in the internet concerning this topic so I'm asking here for help.