May-05-2020, 04:15 PM
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.
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.