Python Forum
Problem with pygame not switching the mouse image
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with pygame not switching the mouse image
#1
So I've made a little thing to change my mouse's icon. It happens once in a blue moon, so I know it works. But it doesn't work 100% of the time.... which seems impossible.
There doesn't seem to be a way to get pygame to look at what image is currently being used as the mouse.
The fact that the prints both work perfectly but the image only switches once out of 79 clicks is extremely frustrating.

Anyone have any ideas for me?
I've tried this several different ways. All of the ways have negatives. Including slowing the program down to unresponding.
It's as if pygame.event.get() is so slow that it just forgets what it's trying to get done. If I put the mouse_cursor

This is the code that I use to get the image to change
gameDisplay = pygame.display.set_mode((display_w,display_h))
gameDisplay.blit(mouse_cursor, pygame.mouse.get_pos())
both are in the spots they should be.
Reply


Messages In This Thread
Problem with pygame not switching the mouse image - by Mondaythe1st - Jul-25-2017, 01:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue with GUI screen switching in Python QT5 code greenelephant 1 238 Apr-04-2024, 09:58 PM
Last Post: deanhystad
  Switching from tkinter to gtk is difficult! snakes 1 1,465 Aug-08-2022, 10:35 PM
Last Post: woooee
  [Tkinter] canvas image problem DPaul 4 6,494 Nov-24-2021, 07:06 AM
Last Post: DPaul
  Problem about image and button scotesse 5 2,984 Apr-27-2020, 10:09 AM
Last Post: scotesse
  [Tkinter] Unable to Access global Variable when switching between frames tziyong 1 3,481 Nov-03-2019, 01:08 AM
Last Post: balenaucigasa
  [Tkinter] Call a function when switching layouts 4096 0 3,542 Sep-22-2019, 07:39 PM
Last Post: 4096
  [PyGUI] Switching between two frames using Tkinter jenkins43 1 4,631 Jul-17-2019, 10:53 AM
Last Post: metulburr
  [Tkinter] switching frames nick123 2 7,916 Apr-18-2019, 04:50 PM
Last Post: francisco_neves2020
  [Tkinter] Problem loading an image from directory into a Canvas object tiotony 3 3,863 Sep-02-2018, 06:47 PM
Last Post: woooee

Forum Jump:

User Panel Messages

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