1 (edited by Lobby 2011-04-30 09:31:43)

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:


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()


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))

    Local rot:Vector3df = cube.GetRotation()
    rot.PlusEq(_VECTOR3DF(1, 1, 1))
    xmax = Driver.getScreenSize().getWidth()
    ymax = Driver.getScreenSize().getHeight()
    cam.setAspectRatio(xmax / Float(ymax))
    device.setWindowCaption(Driver.getFPS() + " FPS, close me by pressing <Alt>+<F4>")


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.

Re: How to set a minimum window size to a resizeable window?

Hi Lobby.  Ive taken a look into the code to see if there was a way to accomplish this.  other than rebuilding the device (which would cause you to rebuild the scene) i could not find a way sad