Friday, October 23, 2015

python - How do I create a selection rectangle?


I have a basic prototype working with health, resources and units. The problem is: How do I select multiple units? I have an idea of making an rectangle which dynamically extends with the mouse position. I think I need to convert this rectangle to transparent rectangle.



Answer



pygame.draw.rect should be enough to draw transparent rectangles, according to documentation if you use width > 0, then the rectangle won't be filled.



No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...