Commit Graph

14 Commits

Author SHA1 Message Date
AlexandreS 3356400026 Redesign of the variables editor
* Each row should be easier to read in a glance
* You can now collapse collection variables for a better readability
* Reorder and move of variables is now available with drag n drop
* You can now undo and redo changes
* Paste one or more variables at any level of depth you want
* Search in the names and values of each variables with a filter effect
2022-05-18 15:18:54 +02:00
Arthur Pacaud d5039b5b51 Prevent variable value to be set to an invalid number ("NaN" ) in the variables editor 2021-08-17 12:19:08 +02:00
Arthur Pacaud afa9b2a2ae Fix invalid values ("NaN") being potentially stored in variables and corrupting the project files (#2568) 2021-04-20 16:47:20 +01:00
Arthur Pacaud 4ec14ed498 Add Array and Boolean variables (#2137)
* In the list of variables (of the scene, of an object or global variables), you can now specify the type of the variable: number, text, boolean, array or structure.
* Boolean variables can be "true" or "false. They can have their values checked with conditions, and updated with actions. They are a good way to store information about if something is enabled or not (is an item equipped, is something selected, etc...).
* Array variables can contain multiple values, indexed by a number. New values, including any kind of variables, can be appended to an array during the game. Arrays can also have a value removed, and using the event "For each child variable", you can run conditions and actions for each value that is present in the array.
* Boolean and arrays are also supported when you transform a variable from or to the JSON format - which is ideal to send web requests, read configuration files or store any kind of arbitrary data.
* Finally, note that array values can themselves be arrays, structures or any variable. This can be useful to construct advanced logic. You can also access arrays (as well as any variable) from JavaScript code block events.
2021-03-07 21:53:12 +00:00
Florian Rival c57e172299 Fix crash when removing all the child variables of a structure variable
Fix #1789
2020-06-04 19:56:11 +02:00
Quarkstar bfef000cc6 Change a structure back to a number/string when its last child is removed (#1677) 2020-04-20 18:09:59 +02:00
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00
Florian Rival 443c49f83e Fix regression due to broken Variable and VariablesContainer copy ctor and assignement operator 2018-04-04 15:10:08 +02:00
Florian Rival e70021d0dd Refactor Variable/VariablesContainer and add copy/paste/delete to VariablesList in newIDE 2018-04-01 23:42:52 +02:00
Florian Rival 10833aa45d [WIP] Add copy/paste/delete in VariablesList in newIDE 2018-04-01 19:44:22 +02:00
Lizard-13 6223fbb792 Add JSON conversion for all variable types and clear structure action (#391) 2017-09-30 19:18:56 +02:00
Florian Rival cc127ff5ba [WIP] Add VariablesList editor to newIDE to edit instances variables 2017-03-13 22:22:19 +01:00
Florian Rival e444e80493 Update copyrights year 2016-01-14 19:46:56 +01:00
Florian Rival 63cb853d72 Change file organization (Events, Extensions + more folders) 2015-11-01 11:26:40 +01:00