![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() |
Flaw in Pygame?
When ever you either minimize the window or move another window over top, it updates the display. This may not sound like a problem, but for me it is.
In my game, whenever you're in an area it's just your character fake walking in the center of the screen, and the entire map moving behind the character in the opposite direction. You can't see the outsides of the map behind the window though because when the area is initiated, I draw a blank screen, and throw a window between two menu screens. And from then only the inside of the window is updated using pygame.display.update([rects]) . But then if you minimize or move a window overtop the rest of the map is revealed over top of the two menu screens and the main window. I managed to solve the minimize problem with a function that is checked in the main loop, that if not pygame.display.get_active() and not minimzed: it redraws the two menus and main window. However, I have no way of checking if a window is being moved overtop of the pygame window. Is there nothing I can do about this? I know I could just make it fullscreen, but that doesn't always work on all computers. |
|
|
|
|
|
#2 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
I don't know, just something I've seen mentioned. That it doesn't always work.
|
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Why not try for yourself and see?
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() |
Yes I did, it didn't work for me either. Including many others. Luckily if it doesn't work, it just proceeds normally, but unfortunately, that doesn't fix my problem.
|
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
What you're asking for is very low-level. You'll need to latch onto some OS-specific callback to inform you of these kind of events and then modify your code to not draw anything accordingly. Absolutely no idea on what these functions are under any platform 'tho.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|