Mouse help!!!

Hey everyone!
I'm VERY new to Allegro... I'm a beginner and I still cannot understand most of things! There are only 2 weeks that I began with Allegro, so I'm still lost about it!

I have a work for college that wants us to make a "simple" (for you experts) program that shows a circle in the screen, filled with a certain color (ok, that was easy for me to create this circle and fill it)

But what i really can't do is: they're asking us to make this circle moves when we move the mouse! I mean... it's like the circle is a new mouse cursor, so basically, the circle HAS TO follow the mouse, but i have NO idea how to do that! ???

I've looked for anything I could, but no success! Please, could you help me?! :'(

Thank you so much!


Just use mouse_x and mouse_y as it's x and y coordinates:

circlefill(buffer, mouse_x, mouse_y, 100, makecol(255, 255, 255));


Oh gosh!

It worked perfectly!!!
Thank u so much for your help buddy! :D :D :D


Np. All the mouse related stuff can be found here:

Thread #591486. Printed from