Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gdevelop5:objects:text_entry [2018/10/03 23:07] valiant_curiosity [Examples] |
gdevelop5:objects:text_entry [2019/06/13 14:13] piyushpalawat99 |
||
---|---|---|---|
Line 2: | Line 2: | ||
# Text entry object | # Text entry object | ||
- | The text entry object captures user input and stores it in memory. You can use this object to simulate text input fields. | + | <note tip> |
+ | [[# | ||
+ | </ | ||
+ | |||
+ | The text entry object captures user input and stores it in memory. You can use this object to simulate text input fields. | ||
==== Add text entry object ==== | ==== Add text entry object ==== | ||
- | To add a Text Entry object, select | + | After creating |
{{ : | {{ : | ||
- | After, rename | + | Rename |
+ | |||
+ | Now, if you run a preview | ||
==== Display value using a text object ==== | ==== Display value using a text object ==== | ||
First, add a Text Object to the scene. Then, add an event to modify the content of the Text object: | First, add a Text Object to the scene. Then, add an event to modify the content of the Text object: | ||
+ | |||
{{ : | {{ : | ||
For the last parameter, which is the new content for the text, use the expression mentioned above: | For the last parameter, which is the new content for the text, use the expression mentioned above: | ||
- | {{ : | + | {{ : |
+ | |||
+ | < | ||
+ | |||
+ | Now if you run a scene preview. Start typing you will see the text object displaying whatever you type. | ||
+ | |||
+ | Using events, it is possible to enable or disable the "Text entry" object. Events also allow you to control when to capture text input and when not to capture text input. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | ## Examples | ||
- | //Note that __Entry__ should be the name of the Text Entry object. You need to replace this with the name of your Text Entry object.// | + | <note tip> |
+ | Open these examples online.</note> | ||
- | Now if you run a preview and start typing you should see the text object displaying whatever you type. | + | {{: |
- | Using events, it is possible to enable or disable the text entry object, to control when capturing input and when not to. | + | * https:// |