[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Window positioning



Wed, Sep 17, 2003 at 04:09:30PM -0700 in <3F68E9AA.3070406@shinners.org>,
Pete Shinners <pete@shinners.org> spake:
>Mark 'Kamikaze' Hughes wrote:
>>   From what I can tell, there's currently no portable way to set the
>> window position, but various platforms do have specific ways.  This is
>> very unpleasant for a game developer, and makes Pygame software look
>> strange to most users.
>>   I have no objection to setting the window size before Pygame.init(),
>> as long as I don't have to 'if os.name == ...' for each system.  Can
>> this be changed for the next version?
>SDL uses a few exotic environment variables to help position the 
>graphics window. sounds like you will be interested in 
>SDL_VIDEO_CENTERED or SDL_VIDEO_WINDOW_POS
>there are plenty of other environment variables you can use to control 
>SDL (and thus, pygame). with python you can fairly easily set these up.
>import os
>os.environ["SDL_VIDEO_WINDOW_POS"] = "300,150"

  Hmn.  Now that I've updated my packages, it works on my Linux box, but
does not work on Windows 98, using Python 2.3 and
pygame-1.5.6.win32-py2.3.exe.

  This message
<http://www.libsdl.org/pipermail/sdl/2003-March/053043.html> suggests
that it's not working on Windows yet.  What version of SDL is embedded
in the Pygame distro, and does a later one make any difference?  I can
see from the history that this is a relatively new feature...

  Thanks!

-- 
 <a href="http://kuoi.asui.uidaho.edu/~kamikaze/";> Mark Hughes </a>