Commit Graph

15 Commits

Author SHA1 Message Date
D8H 4f4b2b7901 Replace touch conditions to also handle the mouse (#4785)
* Add expressions to get the mouse cursor position without touches moving it.
2023-01-17 15:27:58 +01:00
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 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 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 a4c372d945 Convert PointX/PointY argument to a string 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 4c789967c3 Fix code generation of invalid variable expressions 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 a9e1120f00 Add gd::ExpressionCodeGenerator::GenerateExpressionCode 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