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: 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: <5cd72005-e3c3-4ab7-850c-5c2e55e74353@googlegroups.com> From: Ian Kelly Date: Mon, 11 Mar 2013 12:01:48 -0600 Subject: Re: Pygame mouse cursor load/unload To: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Mon, Mar 11, 2013 at 11:33 AM, Alex Gardner 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.