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


Groups > comp.lang.python > #41082

Re: Pygame mouse cursor load/unload

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.061
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'position,': 0.04; 'mouse': 0.07; 'places.': 0.16; 'pygame': 0.16; 'subject:Pygame': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'alex': 0.17; 'drawing': 0.17; 'finally,': 0.22; 'header:In-Reply-To:1': 0.25; 'skip:" 20': 0.26; 'am,': 0.27; 'updating': 0.27; 'message- id:@mail.gmail.com': 0.27; 'subject:/': 0.28; 'sleep': 0.29; 'asking': 0.32; '11,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'doing': 0.35; 'should': 0.36; 'skip:p 20': 0.36; 'display': 0.36; 'two': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'your': 0.60; 'most': 0.61; 'places': 0.61; 'different': 0.63; 'restore': 0.69; '2013': 0.84; 'clamps': 0.84; 'move.': 0.84; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=sTcPVrK5VmC5K38APLPj0uyAbBB8/FaKHRvVPGwJADA=; b=xzdog3Astd1rKCzcLvTkqBMLBsyiC9Y4xcfgzEMMAFaxV5YR2XX+uAMpYn/Ca16z1o IBYxR7gyo43/V7odwPMe7/H6nPW/QY2MOtDtqTM0izd/j7+VKIoLFZTeXN/zMgTDpGve 3n0slewsg1PPvW3jWd62Bn+sB1aMRhSlcsEX1zLgl3ZHLinEQrMVr/yiMFT4f1foQCu5 tZ4Xt2+fP4/3PES2nrSq/s88QFznRr4stRBVoWWG6MGJ4c6AY056XyX34/QE6FXcHOFD eYQCDHl5LTOi48M4Rj42cruf+/d7AJs+vEns47JyUAvBm4L4GAm3cPUBI9iJRYuutBcv XECQ==
X-Received by 10.220.209.135 with SMTP id gg7mr1164581vcb.68.1363024948713; Mon, 11 Mar 2013 11:02:28 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <5cd72005-e3c3-4ab7-850c-5c2e55e74353@googlegroups.com>
References <d6374016-8863-4e8b-9ec9-17a826ca2eee@googlegroups.com> <5cd72005-e3c3-4ab7-850c-5c2e55e74353@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Mon, 11 Mar 2013 12:01:48 -0600
Subject Re: Pygame mouse cursor load/unload
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3200.1363024956.2939.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1363024956 news.xs4all.nl 6841 [2001:888:2000:d::a6]:50658
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41082

Show key headers only | 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