Getting Multi Line Text Input In Pygame
Вставка
- Опубліковано 25 лис 2024
- In this video I will explain how to take text input from the player in pygame.
There are a few options available for this, but the preferred method is to use the TEXTINPUT event, which I will cover in this video.
I'll also explain how to add backspace functionality as well as using the return key to add multiple lines of text.
For the full source code and step by step explanation head over to my website: www.codingwithr...
As a student working with python and pygame, your videos are so helpful! Please keep making these :)
Glad to hear it! Got more lined up :)
the real GOAT. Super short code yet functions like crazy. Thumbs up to you man
Thanks!
From Syria. I appreciate you
Extremely usefull and you made it so simple, congrats, the best pygame videos are yours :)
Glad you think so!
Thanks for video. Do you plan to code Zelda like game?
Maybe in the future! I have some ideas already in progress
hello! i was using the function for bliting the text and realised that it was printing my keys on top of what it had alreaddy printed, any help?!
for eg
h
he
hel
hell
hello
it keeps overwriting on itself in the window :
you have to clear the screen before drawing again
What exactly is the TEXTEDITING event for? The documentation is a bit vague.
Can you make a full video on infinite map generation?
That's an interesting video idea, I'll add it to the list, thanks :)
What do u mean by that? is it like when u moving it auto generate map for u, or is it already stored somewhere? I guess the first one and it ment for a platformer. There are few nice video on YT about oldschool game development how did they made the games back in early 90's. It can help u a lot to optimizing ur games, cause they did use some crazy technique to make it efficient and small as possible cause they had limited memory and hdd space as well so everything had to fit in. :)
I did love to watch them.
I tap w slightly and it draws like 100 ws how do I fix?
great tutorial
cool video!
Thanks!
I love Python...
It's pretty neat!
@@CodingWithRuss
And has so much potential too.
Bit different aproch then how i made my GUI lib multiline texbox but it is a nice and easier way to do. Unfortunatelly i have a bunch of other functionalites what u can not achive with this method that easy.
As long as it works, that's the main thing :) There are often multiple ways to do this kind of stuff.
@@CodingWithRuss Ye, but still pretty good way what u did show to us. Mainly my texblock is not used for user inputs, it is used for loading up dialog text from files and used in dialog window. The only 1 thing i am still thinking to add is the scroll function, what would not be hard to add, i just dont know if i wanna use that long text in general. In games users usually love to use skip button and hardly ever read texts for quests example. :D
In your previous video about different collisions i saw something what was new to me and that was the line collision. Idk if it is new in pygame or it was there before and i just did not noticed it, but it will be handy, so i dont have to write my own function for it. :)