Commit Graph

27 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
Clément Pasteau cf5c8ae631 Improve Expression autocomplete for functions 2021-10-18 13:22:01 +02:00
Florian Rival 6526e8ad8a Allow to enter numbers when accessing to a variable child with brackets notation (e.g: MyVariable[2]) (#2380) 2021-02-22 14:29:06 +01:00
Florian Rival deddfdc4cf Fix ObjectVarToJSON expression not working
Fix #2097
2020-11-16 23:03:49 +00:00
Florian Rival faa02d4459 Add proper handling of closing parenthesis in ExpressionCompletionFinder 2020-03-11 17:41:52 +00:00
Florian Rival 22c6a57394 Improve completions from ExpressionCompletionFinder 2020-03-02 22:11:31 +00:00
Florian Rival 94ac7166ed Add more tests for ExpressionParser2 2020-03-01 19:00:18 +00:00
Florian Rival 88b20240ff Fix location of identifier (function names, etc...) with trailing whitespaces 2020-03-01 18:40:30 +00:00
Florian Rival af93149f6a Add more location information in ExpressionParser nodes
Also fix some whitespace sensitivity of the parser
2020-03-01 17:37:21 +00:00
Florian Rival 4e59573042 Speed up identifiers and other character parsing in ExpressionParser2 2020-02-23 19:41:53 +00:00
Florian Rival ca6f11b55a Support for describing completions to display for an expression (#1447) 2020-02-22 14:27:43 +00:00
Florian Rival d544319302 Add location in ExpressionParser2 and ExpressionNodeLocationFinder 2020-02-11 08:20:09 +00:00
Florian Rival 9c6c8564fa Fix handling of object parameters in expressions 2019-01-28 23:16:20 +00:00
Florian Rival 4b33373296 Fix ConvertToString and code generation for strings with backlash/escaped characters 2019-01-28 23:16:20 +00:00
Florian Rival 0d864ce6a7 Update error message and add test case 2019-01-28 23:16:20 +00:00
Florian Rival 93708cb2f3 Properly handle numbers with leading 0 (normalize them to remove the extra 0) 2019-01-28 23:16:19 +00:00
Florian Rival 3035bc9386 Improve error messages for empty expressions 2019-01-28 23:16:19 +00:00
Florian Rival 4c789967c3 Fix code generation of invalid variable expressions 2019-01-28 23:16:19 +00:00
Florian Rival df68978adc Add edge cases fixes and fuzzy tests for ExpressionParser2 2019-01-28 23:16:19 +00:00
Florian Rival 7a87fd9924 Add support for unary operator in ExpressionParser2 2019-01-28 23:16:19 +00:00
Florian Rival 8d1502cb20 Fix parsing of behaviors expressions 2019-01-28 23:16:19 +00:00
Florian Rival 4fd88072e9 Improve ExpressionParser2 and use it for GenericExpressionField and EventsRefactorer 2019-01-28 23:16:19 +00:00
Florian Rival f2e6f19c34 Add ExpressionParser2NodePrinter 2019-01-28 23:16:18 +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
Florian Rival 0ec6ebad07 Add ExpressionParser2 and tests 2019-01-28 23:16:18 +00:00