Making window fixed size not working

I am trying:

class World(ShowBase):
   def __init__(self):
       #init showbase
        wp = WindowProperties.getDefault() 
        wp.setTitle("My Game")
        wp.setSize(800,600)
        wp.setFixedSize(True)
        WindowProperties.setDefault(wp)
        self.win.requestProperties(wp)        

Title and size work but it’s still resizable.

And your operating system and Panda3D version are…?

Panda3D 1.8.0, Windows 7 64bits

I’m not sure you can change an existing window to fixed-size after it has been created. However, you can specify this property at window creation time, and that ought to work. One easy way to specify this property for the default window is to put:

win-fixed-size 1

in your prc file (or in a loadConfigData() call made before you import DirectStart or create a ShowBase instance).

David

prc does work but not after exported to p3d :frowning:

I think if you create a file with the prc extension and package it into the root folder of your p3d file, it should read it and respect it at p3d launch time. Does this not work?

David

Well, after a long time just figured that I had only to actually set the WP stuff before ShowBase call… Now it works!