removed indicator, reworked click logic

This commit is contained in:
Nicholas Dyer 2023-02-19 20:56:56 -05:00
parent 1d7947803b
commit d9c4401f43
No known key found for this signature in database
GPG Key ID: E4E6388793FA2105

View File

@ -79,6 +79,7 @@ def main(windowed_mode):
running = False running = False
if event.type == pygame.MOUSEBUTTONDOWN: if event.type == pygame.MOUSEBUTTONDOWN:
get_mouse_speed = True get_mouse_speed = True
mouse_pos = pygame.mouse.get_pos()
prev_mouse_pos = mouse_pos prev_mouse_pos = mouse_pos
if event.type == pygame.MOUSEBUTTONUP: if event.type == pygame.MOUSEBUTTONUP:
get_mouse_speed = False get_mouse_speed = False
@ -92,8 +93,6 @@ def main(windowed_mode):
speed_coeff = math.cos((mouse_angle - (0.5 * PI)) - diff_angle) speed_coeff = math.cos((mouse_angle - (0.5 * PI)) - diff_angle)
final_speed = movement_speed * speed_coeff final_speed = movement_speed * speed_coeff
dial.move_dial(final_speed / -3000.0) dial.move_dial(final_speed / -3000.0)
pygame.draw.circle(window, (0, 255, 0), (10, 10), 15)
pygame.display.flip()
pygame.quit() pygame.quit()