Commit Graph

13 Commits

Author SHA1 Message Date
D8H 763aa0aa25 Show expression errors directly in the event sheet (#3823) 2022-06-03 23:02:51 +02:00
Florian Rival 71e3b65134 Add a new "Text input" object (#3508)
* This object displays a field where the player can type a text.
* The cursor can be moved and the text can be selected and entered like any other input field according to the platform. For example, you can use all the usual keyboard shortcuts or emoji pickers on desktop. On mobile, all the usual gestures are supported, emoji pickers, text selection, clipboard...
* You can choose between different input field types: text, text area, email, password, phone number... This allows the keyboards to be adapted on mobile devices. The password field will also hide what is entered by the user.
  * Because the object is way more convenient to use (and actually works on mobile devices) than the Text Entry object, it is recommended you use it almost always instead of the Text Entry object.
* This object has 2 limitations, because it's using the native capabilities of the platform to display a "native" input field: the Z order can't be changed (the object is *always* displayed on top of the game) and no effects can be displayed. Because it's handled by the operating system, it may also slightly differ on each platform.
  * It's recommended you avoid displaying the object outside of a menu or a static UI, as it may not always display exactly at a position synchronised with the rest of the rendering of the game, especially if used in a fast paced or moving scene.
2022-02-13 15:18:31 +01:00
Florian Rival 763d8e8175 Fix renaming resources breaking objects or events using it
* Also fix the Bitmap Font field not shown in the parameters of the action to change it.
2021-09-24 00:09:32 +01:00
D8H d40e360b8a Add support for behaviors based on other behaviors ("behavior composition") (#2781)
* This allows [custom behaviors](http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/events-based-behaviors), that you can create in your project or get from extensions, to require the presence of one or multiple other behaviors on an object.
  * This is an advanced feature that is helpful to create behaviors that are based on other. For example, a behavior "Platformer enemy" using the "Platformer object" behavior and adding specific actions, conditions and logic to make an enemy chase the player.
  * If you create a behavior and want to use this, just go to the properties of this behavior and add a new property. Choose the type "Required Behavior" for this property. You can then use this new behavior in the events of the behavior you just edited.
* To use a behavior based on another, you don't need to do anything special! Just add it to your object as usual: any missing behavior will be added to your object, so you can start using it immediately.
2021-09-06 19:51:42 +01:00
Florian Rival deddfdc4cf Fix ObjectVarToJSON expression not working
Fix #2097
2020-11-16 23:03:49 +00:00
Florian Rival ac90b982ac Hide verbose extension loading logs in tests 2020-02-23 14:49:35 +00:00
Florian Rival 32dd269d18 Add automatic refactoring of project when an events based behavior is renamed 2019-05-08 16:05:03 +01:00
Florian Rival e670563c92 Add tests for WholeProjectRefactorer and events based functions/extensions 2019-05-07 18:11:52 +01:00
Florian Rival 9c6c8564fa Fix handling of object parameters in expressions 2019-01-28 23:16:20 +00:00
Florian Rival a4c372d945 Convert PointX/PointY argument to a string 2019-01-28 23:16:20 +00:00
Florian Rival 4fd88072e9 Improve ExpressionParser2 and use it for GenericExpressionField and EventsRefactorer 2019-01-28 23:16:19 +00:00
Florian Rival 66029c62ed Add Variable code generation for ExpressionParser2 2019-01-28 23:16:18 +00:00
Florian Rival 43d78a74bd Enhance ExpressionParser2 and add ExpressionCodeGenerator 2019-01-28 23:16:18 +00:00