Using The Mouse In Pygame - Beginner Tutorial
HTML-код
- Опубликовано: 14 окт 2024
- In this video I will explain how to get mouse inputs from the player in pygame.
I'll show the two methods for doing this, which are the event handler as well as using the mouse.get_clicked() function to check the state of the mouse buttons. I'll show examples of each method and discuss the pros and cons.
Additionally I'll explain how to work out the mouse coordinates on the screen using the mouse.get_pos() function.
Take a look at the tutorial on my website for a reference on working with mouse input here: www.codingwithr...
Credit for thumbnail mouse image: www.vexels.com...
This was a great refresher.
Thanks!
Thanks! Great overview of event handling for the mouse.
Glad it was helpful!
Hi Russ, I've been following your vids. But I really need your help, currently im having issue with my code. Would you be able to make a vids on "How to make Log.Event" without using pygame?
Amazing tutorial❤
Thanks, glad you liked it
Solid! Thank you!
Glad it helped!
Thanks from Algeria
Welcome!
Do I have to do It manually if I want It to only react once per click without using event handler?
Hello folks! Visit codingwithruss.com/tutorial/mouse-input to get the code and a quick reference of what was covered in this video.
what ide do you use?
Sublime text
😄
:)