[SOLVED] Drawing User input (as text)

I’m trying to write a game, and it requires the user to guess letters to guess a word. Right now I’m working on getting the user input into the system and drawing it on the screen. I tried using the keyPressed and drawString functions but nothing seems to be working.
I’m really not sure how to do this, can anyone direct me on how I would be able to?

Normally I would use cin and cout to do this, but that doesn’t work when I’m trying to draw it with graphics. My program should prompt the user to guess a letter, and if the letter entered is a part of the word, it goes on the screen in the word. If not, it goes in an empty box on the screen (like wheel of fortune/hangman). Either way, the user should be able to enter a letter and have it draw/print on the screen.

Hi there!

When doing something like this:

char inputCharacter;

on the: draw(){
    ofDrawBitmapString(inputCharacter, 20, 20);
}
on the keyPressed(int key){
    inputCharacter = key;
}

It’s enough to draw characters on the screen. But if you want more control over how to input text and draw typography, I recommend you to check the fontsExample and fontShapesExample on the examples/graphics folder. Good work!

Thanks so much!!