Problem Converting int to string

Hi, me again :slight_smile:,

I’m trying to create a function that will change the panda window to fullscreen based on the width and height values I put

Here is the code:

from pandac.PandaModules import *

def MakeFullscreen(width, height):
    loadPrcFileData('','win-size '+str(width)+' '+str(height))
    loadPrcFileData('','fullscreen 1')

When I run my game using this function it just pulls up the default sized window, no python exceptions or anything.

I’m confused :confused:

Make sure you are calling this MakeFullscreen function before you import DirectStart only.

If you want to change an existing window from fullscreen to windowed or vice-versa, you have to do a bit more work. Try searching the forums; there are a few examples of people doing this successfully.


Thanks guys.

@Dave: I’ll look into that.