[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Help - Events
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Help - Events
- From: Thiago Petruccelli <thiagopetruccelli@xxxxxxxxx>
- Date: Tue, 17 Nov 2009 14:26:32 -0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 17 Nov 2009 11:26:54 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=DDv+gMD6Mc5qLPAAE5ogztsVFB4jKJYLpFMrOEE8k74=; b=WBkpUVJjcYuPXskE2wrwIuaJEWyHiQQ/5VYGG0vebySpSrm7aqhQN6WakpZ6A4vXnm AMx+wk/i7Gr1qAOqdOX6lk3PjgxPRbSGy56y/hyo5fvCOp29Sqf0+Pyv8S07NvGN9GE3 OSo60vQrXFATBd7Y49kfJFUMW71/wlmhKlVEE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=vxBx73LGvQ2JJ6xxRzVa/nItchbGzJvptvn5t+8qk5xuLtW7MR1jXv/wYW/YTUkUJx /QPJ6wi24Ryqc9L2lvJNlPlWtqN8H+SE7kYBI3W9/91Zk58bRvsJPcbG5NVaUu7v2q/U 4yq52nAMe0cgdyGnzZAsfAApdUTXbsrAawBVk=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi!
I am making a game in wich the player has to fill an area with tiles. It's an educational game. But I got a problem with pygame events... Actually I think it's a simple problem, but I don't know how to solve.
There are two functionalities for the left click of the mouse: the first is to put a tile in the area, when dragging one tile, and the other is to remove one tile of the area (when not dragging). The problem is that, when I put both codes together, the two things happen at the same time - it puts the tile and then removes it. I've tried to block the removal of the tile setting a variable, "placed", which blocks the action of removing the tile until the next event handling. But it didn't work.
Can someone help me solve this?
Thanks in advance,
--
Thiago Henrique Petruccelli