Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96110 > unrolled thread
| Started by | "ast" <nomail@invalid.com> |
|---|---|
| First post | 2015-09-08 11:33 +0200 |
| Last post | 2015-09-08 08:12 -0600 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
pygame basic question "ast" <nomail@invalid.com> - 2015-09-08 11:33 +0200
Re: pygame basic question Laura Creighton <lac@openend.se> - 2015-09-08 12:14 +0200
Re: pygame basic question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-08 12:03 +0100
Re: pygame basic question Dave Farrance <df@see.replyto.invalid> - 2015-09-08 15:01 +0100
Re: pygame basic question Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-08 08:12 -0600
| From | "ast" <nomail@invalid.com> |
|---|---|
| Date | 2015-09-08 11:33 +0200 |
| Subject | pygame basic question |
| Message-ID | <55eeab88$0$22574$426a74cc@news.free.fr> |
Hi
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
The first line opens a 400x300 pygame window.
The second one writes "Hello World" on top of it.
I am just wondering how function set_caption finds the windows
since the window's name DISPLAYSURF is not passed as
an argument
It would have understood something like:
DISPLAYSURF.set_caption('Hello World!')
or
pygame.display.set_caption(DISPLAYSURF, 'Hello World!')
thx
[toc] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-09-08 12:14 +0200 |
| Message-ID | <mailman.211.1441707260.8327.python-list@python.org> |
| In reply to | #96110 |
Try the pygame mailing list for that one. http://www.pygame.org/wiki/info?action=view&id=4890 Laura
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-09-08 12:03 +0100 |
| Message-ID | <mailman.212.1441710213.8327.python-list@python.org> |
| In reply to | #96110 |
On 08/09/2015 11:14, Laura Creighton wrote: > Try the pygame mailing list for that one. > http://www.pygame.org/wiki/info?action=view&id=4890 > > Laura > Or https://www.reddit.com/r/pygame -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Dave Farrance <df@see.replyto.invalid> |
|---|---|
| Date | 2015-09-08 15:01 +0100 |
| Message-ID | <ahptuap2f1lntqjvimakoul7ue1ie864qn@4ax.com> |
| In reply to | #96110 |
"ast" <nomail@invalid.com> wrote:
>DISPLAYSURF = pygame.display.set_mode((400, 300))
>pygame.display.set_caption('Hello World!')
>
>The first line opens a 400x300 pygame window.
>The second one writes "Hello World" on top of it.
>
>I am just wondering how function set_caption finds the windows
>since the window's name DISPLAYSURF is not passed as
>an argument
https://www.pygame.org/docs/ref/display.html
As it says, there is only *one* display surface, and any non-displayed
surface must be blitted (copied) onto the display surface for
visibility. So all "pygame.display" methods refer to that one display
surface. Non displayed surfaces, on the other hand, do need to be
instantiated with "pygame.Surface"
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-09-08 08:12 -0600 |
| Message-ID | <mailman.224.1441721608.8327.python-list@python.org> |
| In reply to | #96129 |
On Tue, Sep 8, 2015 at 8:01 AM, Dave Farrance <df@see.replyto.invalid> wrote:
> "ast" <nomail@invalid.com> wrote:
>
>>DISPLAYSURF = pygame.display.set_mode((400, 300))
>>pygame.display.set_caption('Hello World!')
>>
>>The first line opens a 400x300 pygame window.
>>The second one writes "Hello World" on top of it.
>>
>>I am just wondering how function set_caption finds the windows
>>since the window's name DISPLAYSURF is not passed as
>>an argument
>
> https://www.pygame.org/docs/ref/display.html
>
> As it says, there is only *one* display surface, and any non-displayed
> surface must be blitted (copied) onto the display surface for
> visibility. So all "pygame.display" methods refer to that one display
> surface. Non displayed surfaces, on the other hand, do need to be
> instantiated with "pygame.Surface"
Also, note that the display surface DISPLAYSURF is not the window.
It's just a Surface object that pygame uses to paint the contents of
the window. AFAIK pygame maintains the actual window data structures
internally and does not expose them to the API.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web