Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41082

Re: Pygame mouse cursor load/unload

References <d6374016-8863-4e8b-9ec9-17a826ca2eee@googlegroups.com> <5cd72005-e3c3-4ab7-850c-5c2e55e74353@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2013-03-11 12:01 -0600
Subject Re: Pygame mouse cursor load/unload
Newsgroups comp.lang.python
Message-ID <mailman.3200.1363024956.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Mar 11, 2013 at 11:33 AM, Alex Gardner <agardner210@gmail.com> wrote:
> My bad!  http://pastebin.com/yuvpT7bH

You're still drawing the blank paddle in two different places.  One of
those places is immediately after you draw the paddle, which undoes
the work you just did in drawing it.  That's why you're not seeing the
paddle.

You're also still not updating the paddle_rect from the current mouse
position, so if you fix the above issue you will find that the paddle
still will not move.  You should restore the "paddle_rect.center =
pygame.mouse.get_pos()" line that you deleted prior to the line that
clamps it.

Finally, you currently have the "clock.tick()" call before the
"pygame.display.update()" call, which makes no sense.  You're doing
your drawing, asking pygame to sleep for 20 milliseconds, and only
then updating the display.  You want to update the display before the
clock.tick() so that the user can actually see the most recent frame
during those 20 milliseconds.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-02 17:56 -0800
  Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-02 20:08 -0700
    Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-02 19:52 -0800
    Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-02 19:52 -0800
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-03 14:04 -0800
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-03 14:09 -0800
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-03 16:47 -0700
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-09 16:20 -0800
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-09 16:25 -0800
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-10 13:23 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-10 15:25 -0700
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-10 19:26 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-11 09:57 -0700
    Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-11 10:00 -0700
      Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-11 10:04 -0700
      Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-11 11:24 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-11 10:33 -0700
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-11 12:01 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-11 13:43 -0700
    Re: Pygame mouse cursor load/unload MRAB <python@mrabarnett.plus.com> - 2013-03-11 20:54 +0000
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-11 15:23 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-12 16:33 -0700
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-12 21:00 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-14 15:16 -0700
    Re: Pygame mouse cursor load/unload Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-14 16:31 -0600
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-14 15:56 -0700
  Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-18 13:24 -0700
    Re: Pygame mouse cursor load/unload Alex Gardner <agardner210@gmail.com> - 2013-03-18 16:05 -0700

csiph-web