Skip to content

GetText

Otavio edited this page Dec 5, 2022 · 3 revisions

CWidgets::GetText

What it does:

This functions returns the current typed text from a widget.

What it returns:

This function returns a std::string.

Usage:

This function can be used to get the current text from a TextBox.

Widgets:

List of widgets that are using this function:

  • TextBox

Example:

Let's say I want to draw what I'm typing on the screen:

// This will render a string on the screen with the text typed in the TextBox.
FGUI::REBDER.Text(10, 10, myFont, TextBox->GetText())

What's next?

Next you will learn about the GetState function.