MyreMylar / pygame_gui

A GUI system for pygame.
MIT License
662 stars 78 forks source link

Is there a Text Entry Box? #475

Closed Toma400 closed 9 months ago

Toma400 commented 9 months ago

Hello once again! I have a question, this time on text boxes. I've decided to let players write their own stories in game, but right after that I realised that PyGameGUI... offers no Text_Entry_Box element. You can either have Text_Box which - as far as I'm aware - is not exactly interactible; or Text_Entry_Line which uses single line and so it doesn't have such smooth support for HTML nor Markdown-like spacing in rawstrings, like former does. Obviously you can write single-line and put <br> wherever you want this to be formatted (and I'm most likely to use that right now), but I'm asking here because maybe there's a way to mix functionalities of those two that I don't have idea about. If this wasn't ever in PyGame_GUI features, then I can on the other hand vote for this idea, as it'd help quite a lot with user-narrated-driven software.

MyreMylar commented 9 months ago

There is a text entry box. I have just noticed that the API documentation for it didn't build last time for some reason, but it is in the theming docs and also in one of the example programs. It is called UITextEntryBox

Toma400 commented 9 months ago

Thank you a ton <3

I will close that after the comment, but I just wanted to say that initially I wanted to treat PyGame GUI as placeholder for my own GUI system, and while in some areas this will happen (I can't imagine PGUI listboxes being so flexible that you can customise each field with several texts and images), the quality of this library is so good that I'm certainly keeping at least some of the features, textboxes being most amazing. Formatting integration being semi-Markdown/HTML with possibility to even add images... it's crazy how greatly it works with multilined strings from TOML files. It's perfect way to incorporate readable books for my RPG game, alongside many other features. Not to even say how little intrusive PyGameGUI is into code workflow, this is probably the selling point that I love the most about it.

So it's weird say to say thank you, but I just wanted to say thank you once again ^^'