You can do something like this at the very top of your python file:
from pandac.PandaModules import loadPrcFileData
loadPrcFileData('', 'win-size 800 600') #- The window size you would like
loadPrcFileData('', 'win-fixed-size #t') #- Specify that the window is a fixed size (non resizeable)
#- Then you can import DirectStart and DirectObject (which opens the main window) (or "frame")
from direct.directbase import DirectStart
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import loadPrcFileData
loadPrcFileData('', 'win-size 800 600') #- The window size you would like
loadPrcFileData('', 'win-fixed-size #t') #- Specify that the window is a fixed size (non resizeable)
from Objects import *
from Constants import *
import direct.directbase.DirectStart
from panda3d.core import Point2,Point3,Vec3
from direct.showbase.DirectObject import DirectObject
class GUI(DirectObject):
def __init__(self):
base.disableMouse()
self.bg = loader.loadModel('models/all')
self.bg.reparentTo(PARENT)
self.bg.setPos(Point3(0,DEEP,7))
self.bg.setScale(44)
self.bg.setBin('background', 0)
self.bg.setDepthTest(False)
self.bg.setTexture(loader.loadTexture('textures/background.png'), 1)
self.board = Board(7,6)
self.objectList = []
g = GUI()
run()
I tried using the code provided on a Windows 7 64-bit machine, and it did not prevent resizing. This is the exact snipped I used (at the top of the .py file, before DirectStart: