Commit Graph

45 Commits

Author SHA1 Message Date
D8H 080fc35c14 Fix property value loss when renaming a property in the extension editor (#8211) 2026-02-05 19:30:53 +01:00
D8H 28cea4d94c Allow events to use resources parameters and properties (#7942) 2025-11-13 14:08:01 +01:00
D8H 896f56e850 Allow to switch between variants of custom objects (#7403)
- Variants allows to restyle custom objects
- They can be customized with the graphical editor
- The asset store will progressively use them notably for UI elements (buttons, sliders)
2025-04-24 11:05:00 +02:00
D8H 60e36f37b1 Remove EventsFunctionsExtension inheritance to EventsFunctionsContainer (#7326)
- developer changelog only
2025-01-20 11:29:55 +01:00
D8H d6c99b27af Allow to use parameters and properties in the variable action and condition (#7124) 2025-01-15 23:28:18 +01:00
D8H 8a0045b3b0 Rename events-function parameters in events (#7215) 2024-12-13 19:57:14 +01:00
D8H 8743f70aaf Disable the variable editor button for object parameters (#7202) 2024-11-28 16:05:49 +01:00
D8H e111706a27 Fix variables from being renamed with a property (#7186) 2024-11-26 17:58:59 +01:00
D8H 2e941c5afc Add tests on property renaming in expressions (#7146)
- Don't show in changelog
2024-11-11 17:23:18 +01:00
Florian Rival 5bc80537b7 Fix leaderboards not properly replaced in projects using them in custom objects (#7131) 2024-11-06 12:46:34 +01:00
D8H 00f67ca7c7 Allow custom objects to use leaderboard properties (#7081) 2024-10-22 14:43:47 +02:00
D8H e9781133e1 Fix events refactoring when duplicating custom behaviors or custom objects (#7005) 2024-10-10 19:48:31 +02:00
D8H 011abaf808 Allow drag and drop in the extension function parameter editor (#6847) 2024-08-20 10:29:52 +02:00
D8H 00a5c93b35 Automatically rename identifiers in event-based objects (#6769)
- Don't show in changelog
2024-07-22 15:14:03 +02:00
Florian Rival a51c223c9c Add experimental, work-in-progress visual editor for custom objects (aka "prefabs"/"templates") (#6699)
* Still to do: 
  * Properly handle effects (disable 3D effects) for layers
  * Handle hot reloading properly
  * Avoid duplicating the configuration of the custom object inside each object created from it. Instead, only store the modified values.
  * Add a "Extract as a custom object ("prefab")" when selecting instances in a scene.
  * Add a dialog to give choice between 2D or 3D object when creating one.
  * Make sure "behavior shared data" are properly handled (physics, pathfinding...)
  * Check if we need to give an expression to translate coordinates from the parent to the local custom object.
  * Ensure a deleted custom object does not break the editor

Co-authored-by: Davy Hélard <davy.helard@gmail.com>
2024-07-11 11:27:34 +02:00
D8H ab63e02862 Fill empty behavior parameters in actions/conditions when a behavior is attached to an object (#6633) 2024-06-07 17:09:58 +02:00
D8H 12275d0814 Always keep events when an object is deleted (#6615) 2024-06-03 18:04:11 +02:00
Clément Pasteau fdd702cd09 Fix renaming a layer with external layouts (#6140)
* Instances of external layouts and of the attached scene are now all moved properly to the renamed layer
2024-01-04 10:31:34 +01:00
Florian Rival a0925c79c3 Add a new simplified way to use variables in expressions, and automate renaming of variables in events (#5580)
* You can now simply write the name of the scene or global variable in an expression to use it: `1 + MyVariable` (instead of `1 + Variable(MyVariable)`).
* Objects can also have their variables accessed like this: `MyObject.MyVariable` (instead of `MyObject.Variable(MyVariable)`.
* This also works for properties inside functions of behaviors or custom objects. For example, you can write `Speed` instead of `Object.Behavior::PropertySpeed()`.
* This syntax will also handle all types of variables without the need to write ToString. For example, you can now write "Score: " + CoinsEarned instead of "Score: " + ToString(Variable(CoinsEarned)).
* This syntax will only work (and autocompletions will be shown) if you add the variable in the variables editor of the scene, the project or in the variables of the object. It's a good practice to always declare your variables here and give them a default value - do it to benefit from this new simplified syntax, which will make your formulas and expressions much more readable.
* When you rename a variable in an editor, it will now rename the variables everywhere in the events of the project. This makes it much easier to change the name of a variable if you find a better one. Note that this works for "rootæ variables, but not variables inside structures or arrays.
2023-09-21 18:56:12 +02:00
D8H 8157d3c9db Fix layers deletion when instances are in several external layouts (#5548) 2023-08-10 15:53:40 +02:00
Clément Pasteau f95d197634 Fix a bug where renaming project elements wouldn't work when an action is using the default layer (#5524) 2023-08-02 11:27:39 +02:00
D8H b94ce2b20d When renaming or removing an object, only refactor associated external events (#5155)
* The editor used to refactor every events that were used in the object layout even if they were associated to another layout which could result to errors.
2023-03-27 12:55:00 +02:00
D8H 859b1d0a1c Refactor events when project elements are renamed (#5031)
* Project elements are: scenes, external layouts, external events, layers, layer effects, object effects, sprite animations and sprite points.
2023-03-20 12:02:36 +01:00
D8H 60c0a0c1a8 Adapt the events of a behavior when it is copied from one extension to another (#4812) 2023-02-27 12:42:49 +01:00
D8H 02bbdfecd4 Allow event-based behaviors to declare scene properties (#4464) 2022-11-10 11:43:16 +01:00
D8H fd03deb4ea Allow event extensions to define conditions and actions with an operator (#3909) 2022-10-29 23:20:10 +02:00
D8H 80cb6d697c Handle custom objects at runtime (#4294)
* Don't show in changelog
2022-10-18 13:36:48 +02:00
D8H 441cd20846 Fix a crash when renaming a child-object (#4281)
* Add tests for object renaming in events.
* Don't show in changelogs.
2022-09-13 12:46:20 +02:00
D8H aed4b76a3f Refactor behavior configuration model (#4217)
* Merge BehaviorContent into Behavior and add CustomBehavior
* Don't show in changelogs
2022-08-29 09:21:21 +02:00
D8H 7893b892a3 Add an events-based object editor prototype (#4208)
* don't show in change logs
2022-08-22 14:05:58 +02:00
D8H 59a7690748 Fix the "move parameter" refactor for expressions in the extension editor (#3968) 2022-08-12 14:04:12 +02: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 ca6f11b55a Support for describing completions to display for an expression (#1447) 2020-02-22 14:27:43 +00:00
Florian Rival 710c2f0304 Fix renaming a property not renaming property expression used in a property action/condition 2020-02-19 08:33:32 +00:00
Florian Rival 727fa8a538 Fix WholeProjectRefactorer renaming/moving parameters of wrong functions for behaviors 2020-02-18 23:27:19 +00:00
Florian Rival 9eb548452a Add MoveEventsFunctionParameter and MoveBehaviorEventsFunctionParameter in WholeProjectRefactorer 2019-12-27 22:21:24 +01:00
Florian Rival fbde5edfae Add automatic refactoring of events/groups when renaming/deleting a group (#1225) 2019-09-11 08:39:44 +01:00
Florian Rival 181976e1b3 Add refactoring of properties actions/conditions/expressions when renaming property/behavior/extension 2019-06-16 17:08:55 +01:00
Florian Rival 58db3beaf8 Add more tests for WholeProjectRefactorer 2019-05-10 14:05:04 +01:00
Florian Rival 89ac323c8e Add support for automatic refactoring when events function (including expressions) is renamed 2019-05-10 11:37:33 +01: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 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 b426212496 Add ObjectGroupsContainer in GDCore and improve groups edition in newIDE 2017-09-23 21:28:29 +02:00
Florian Rival def81b6a62 Move DependenciesAnalyzer to GDCore and added WholeProjectRefactorer 2017-07-09 13:28:45 +02:00