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

Re: [pygame]



black wrote:
I load and display an image and found it laid at center of the screen,
here I want some method like set_xPos and set_yPos to set its location
when it disappears, how can we achieve that plz ?
SDL has no built-in way to control the position of the window it creates. but there are some sneaky ways to control it with environment variables. before you create the window with pygame.display.set_mode() try some code like this.

import os
os.environ["SDL_VIDEO_WINDOW_POS"] = "10,10"