lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
539 stars 188 forks source link

Add a text input box function #197

Open aryoda opened 5 years ago

aryoda commented 5 years ago

To capture eg. player names a text input box would be helpful.

Using other GUI toolkits like tkinter do not integrate well into pgzero (eg. different fonts, windows positioned outside of the game window...).

Possible implementations (based on self-drawn objects using only PyGame):

https://stackoverflow.com/questions/46390231/how-to-create-a-text-input-box-with-pygame https://github.com/Nearoo/pygame-text-input

lordmauve commented 5 years ago

This is a good idea, and generalises to a whole "UI" system.

Nearoo/pygame-text-input looks promising, or a more comprehensive widget framework is Albow: https://pypi.org/project/python3-albow/