InputField

What is it ?

Inputfield is made to enter a text, numbers, email etc... really useful to interract with player if you need a text.

How create it ?

You have to add InputField component in a GameObject. All component require will be added by the InputField.

Example :

auto inputFieldObject = scene.createScene("My Button");

auto inputField = std::make_shared<KapEngine::UI::Inputfield>(inputFieldObject);
inputFieldObject->addComponent(inputField);

Functions

  • setPlaceholderText : set the text of placeholder (text display when there is no content)

  • setInputType : set the type of input (to allow keys or not)

  • setBackground : set an image in background of button

Example :

Last updated