Python Forum
help with python mouse clicks and Pygame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with python mouse clicks and Pygame
#6
This is programming. You can do what ever you put you mind too. So yes.

You need to put boolean variable around surface.blit(line_surface, (0, 0). Create show_lines = False before main loop. Then an if block around surface.blit(line_surface, (0, 0).
You need a new variable. draw_line = None under display_line before main loop.
Then in event mouse button down. draw_line = mouse_position, event.pos
Then you draw it like display_line.
99 percent of computer problems exists between chair and keyboard.
Reply


Messages In This Thread
RE: help with python mouse clicks and Pygame - by Windspar - May-05-2020, 04:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Accurate Clicks Per Second Hamti 5 4,013 Sep-06-2022, 07:14 AM
Last Post: zackwang
  [split] Accurate Clicks Per Second kathyalex 4 3,206 Feb-16-2021, 04:27 PM
Last Post: SheeppOSU
  Accurate Clicks Per Second JudyLarose 8 9,470 Feb-10-2021, 03:00 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020