Does anyone know how to create a virtual keyboard?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Henryteo

Hello, I thank you in advance for your help: I want to create a virtual keyboard to play hangman, does anyone know how to create a virtual keyboard?

Do you mean like this?

https://wordlegame.org/

Enfyna | 2023-04-04 19:38

:bust_in_silhouette: Reply From: pox

I would make each button manually with the same parent, put the letter as the button text. In the parent script, connect their pressed signals in a for loop with get_children(), and bind the button text. Connect it to a function that takes that text as parameter and proceed to compare it to each letter on the hangman and do the game logic.