Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gdevelop:documentation:manual:edit_text [2015/05/18 12:28] (current)
Line 1: Line 1:
 +====== The Text Editor ======
 +
 +The text editor allows you to edit strings and combine them with parameters from actions and conditions, as shown below:
 +
 +{{ gdevelop:​documentation:​manual:​newitem63.png?​nolink |}}
 +
 +===== Writing expressions =====
 +
 +Expressions are displayed in the upper part of the window. They can contain a simple text in quotation marks (e.g. ''"​Game Over"''​) or function calls (e.g. ''​VariableString(PlayerName)''​), ​ separated by the plus sign + (e.g. ''"​Lives:​ " + Variable(Lives)''​).
 +
 +The bottom half of the editor shows the available properties: choose a property in one of the two lists, click on **Add**, and fill out the necessary parameters. You can also insert the result of a numeric expression by clicking on **Insert a numeric expression**:​ edit the numeric expression in the pop-up.
 +
 +===== Some examples and helpful functions =====
 +
 +You can insert mathematical expression using **ToString** function, e.g. ''"​4+5="​ + ToString(4+5)''​. ToString() converts a numerical value to a string.
 +
 +By pressing the **//Insert a numeric expression button//**, you can enter a numeric expression. The ToString() function will be automatically added:
 +
 +<​code>"​Object position: " + ToString(myObject.X())+";"​+ToString(myObject.Y())</​code>​