Re: [pygame] Drawing a box with the mouse

2007-07-28 Thread Ian Mallett
On 7/28/07, Ian Mallett <[EMAIL PROTECTED]> wrote: > > I also assumed that yellow_block is a single yellow block of color. I > think it would be faster to draw a rectangle of a single color than to load > a image of one. ...but in case you are using an image: import pygame from pygame.locals im

Re: [pygame] Drawing a box with the mouse

2007-07-28 Thread Ian Mallett
I often find it easier to rewrite the code myself, then to modify someone else's. I also assumed that yellow_block is a single yellow block of color. I think it would be faster to draw a rectangle of a single color than to load a image of one. On 7/28/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> w

Re: [pygame] Drawing a box with the mouse

2007-07-28 Thread Ethan Glasser-Camp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric Hunter wrote: > if event.type == pygame.MOUSEBUTTONDOWN: > mouseX1, mouseY1 = pygame.mouse.get_pos () > print "Mouse 1", mouseX1, mouseY1 > clear = pygame.event.clear() > while not pygame.MOU

Re: [pygame] Drawing a box with the mouse

2007-07-28 Thread Ian Mallett
import pygame from pygame.locals import * import os, sys pygame.init() surface = pygame.display.set_mode((800,600)) mouse1x = 0 mouse1y = 0 mouse2x = 0 mouse2y = 0 point_drawing = 1 can_click = 1 def main(): global mouse1x, mouse1y, mouse2x, mouse2y global point_drawing global can

Re: [pygame] Static Noise in the Music

2007-07-28 Thread Jason Coggins
The OS is Ubuntu (linux), Python 2.5, and Pygame 1.7. Jason - Original Message - From: "Luke Paireepinart" <[EMAIL PROTECTED]> To: Sent: Saturday, July 28, 2007 8:11 PM Subject: Re: [pygame] Static Noise in the Music Jason Coggins wrote: I have used Pygame to create a simple progra

[pygame] Drawing a box with the mouse

2007-07-28 Thread Eric Hunter
I've been working at this for some time now and I can't figure out what the problem is. What i'm trying to do is when the mouse is clicked, it saves the mouse x,y then when the mouse clicks again at a different location it saves the new mouse x,y then transforms.scale a image of a box with those co

Re: [pygame] Static Noise in the Music

2007-07-28 Thread Luke Paireepinart
Jason Coggins wrote: I have used Pygame to create a simple program that plays a list of music files contained in a folder but for some reason when the music is played it has static noise mixed with the music. I know the music does not contain the static noise (it is commercial music which play

[pygame] Static Noise in the Music

2007-07-28 Thread Jason Coggins
I have used Pygame to create a simple program that plays a list of music files contained in a folder but for some reason when the music is played it has static noise mixed with the music. I know the music does not contain the static noise (it is commercial music which plays perfectly fine in a