Need text/button input in pygame : <p>All I need right now is basic text fields and buttons for input in pygames. A text field as some simple structure that I can read into variables, and a button to call a function. </p>

<p>First, I browsed around and found it was not a straight-forward process to create a text field in pygames. Eventually, by cobbling together <a href="https://stackoverflow.com/questions/46390231/how-to-create-a-text-input-box-with-pygame">this wall of code</a>, I became the proud father of one, somewhat broken text field. Then I looked into buttons, and found to some horror that implementing them is <a href="https://pythonprogramming.net/pygame-buttons-part-1-button-rectangle/" rel="nofollow noreferrer">even more complicated</a>. </p>

<p><code>Surely PyGame has some sort of buttons module built in right? No.</code> </p>

<p>Excuse me? I'm not trying to write a whole program just for one button, I just need the interface for a deeper simulation. That's all. </p>

<p>So then I looked into Tkinter, which has very easy-to-understand commands for GUI input. But no, that was also <a href="https://stackoverflow.com/questions/42931818/how-to-embed-a-tkinter-window-into-a-pygame-game-gui?rq=1">not meant to be</a>. </p>

<p><code>I don't believe you can embed tkinter in to pygame.</code></p>

<p>So then I tried PGU, but found a stunning lack of any straight-forward examples of how to actually use it for what I need (simple text fields and buttons). When I tried looking for one, I found <a href="https://gamedev.stackexchange.com/questions/5785/are-there-any-good-ui-widget-toolkits-for-pygame">this piece of wisdom</a>.</p>

<p><code>Are there any good, modern widget toolkits for Pygame? No. Every year someone makes a new Pygame UI library and then abandons it after a few versions</code></p>

<p>So if that was true, how is anyone supposed to get anything done with this language? What exactly is the best practice for a simple textfield and simple button in a pygame environment?</p>
