Skip to content

Commit b33a148

Browse files
NBForgeLab4ianClementPasteauD8Hgithub-actions[bot]
authored
000 (#11)
* Send context of the conversation to improve AI asset search * Add a short description for all extensions and dimension field (2D, 3D, 2D/3D or n/a) (4ian#8303) Only show in developer changelog * Add missing support for short description/dimension Don't show in changelog * Fix being able to rename a layer with shortcut (4ian#8309) * Fix opening the 3D editor not working after launching a preview first on the web (4ian#8310) * Fix property group wrongly set when dragging a folder to the root (4ian#8312) * Fix handling of instance/locked variables (4ian#8311) - Removed the + button that was wrongly shown to add an instance variable (instance variables can only "override" the values of the variables defined in the object) - Fix paste/delete a child of structure/array of a variable that is re-defined in instances variables. Previously it was not possible to paste a variable as a child of a instance variable that was a structure/array. This is now possible (and fully supported - you can't add new variables at the root, but items inside structures/arrays can be changed). * Fix properties sometimes missing or duplicated when grouped in columns (4ian#8313) * Fix keyboard shortcuts (copy/cut/paste/delete/undo/redo) not working when editing variables * Replace old search bar by compact search bar in scene editor panels (4ian#8317) * Improve robustness of AI events generation and asset swapping * [Auto PR] Update translations (4ian#8304) This updates the translations by downloading them from Crowdin and compiling them for usage by the app. Please double check the values in `newIDE/app/src/locales/LocalesMetadata.js` to ensure the changes are sensible. Co-authored-by: 4ian <1280130+4ian@users.noreply.github.com> * Add support for ordering For Each by an expression, with optional limit (4ian#8319) - For advanced use cases where it's important to run events on each instance of an object with an ordering, the For Each can now have an ordering: an expression can be written and will be evaluated for each instance separately. The For Each will then execute for each instance in the order of the result of the expression. - It's possible to change the direction (ascending or descending) - It's also possible to give a limit (for example, 1 will allow to pick just the instance with the highest/lowest value for the expression). - Examples are provided in the UI for common use cases (maximum value of a variable, health points, ammo, distance to another object...) * Update cordova config for new xcode/ios versions (4ian#8321) Only show in developer changelog * Fix tileset scrollbar area changing selection (4ian#8324) Fix 4ian#8316 * Improve details of center/origin when an object is created by the AI (4ian#8322) * Add a simplified version of the Anchor behavior editor (4ian#8325) * [Auto PR] Update translations (4ian#8323) * Bump newIDE version * Fix size calculation for variants Don't show in changelog * [Auto PR] Update translations (4ian#8328) * Fix new group name to ensure no usage of forbidden characters (4ian#8329) * Add storybook stories for Anchor behavior editors (4ian#8330) Do not show in changelog * Fix brackets showing in the top right corner of the scene editor (4ian#8332) Don't show in changelog * Fix Scene Editor panels not resizing as small as possible (4ian#8331) * Allow to import asset pack files (GDO) (4ian#8296) * Explain the difference between built-in and external extensions in the documentation (4ian#8335) - Don't show in changelog * Fix to avoid objects to move when the gizmo dragging point is clicked (4ian#8334) * Tweak the delay before moving an object with gizmo in the 3D editor * Fix event generation errors not properly reported * Allow multiple deletions in a single operation for generated events * Persist properties panel scroll position for instances and objects (4ian#8337) --------- Co-authored-by: Florian Rival <Florian.rival@gmail.com> Co-authored-by: Florian Rival <florian@gdevelop.io> Co-authored-by: Clément Pasteau <4895034+ClementPasteau@users.noreply.github.com> Co-authored-by: D8H <Davy.Helard@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: 4ian <1280130+4ian@users.noreply.github.com> Co-authored-by: LuniMoon <103995399+LuniMoon@users.noreply.github.com>
1 parent 7da3ae4 commit b33a148

File tree

263 files changed

+7546
-1249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+7546
-1249
lines changed

Core/GDCore/Events/Builtin/ForEachEvent.cpp

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ namespace gd {
1616
ForEachEvent::ForEachEvent()
1717
: BaseEvent(),
1818
objectsToPick(""),
19+
orderBy(""),
20+
order("asc"),
21+
limit(""),
1922
variables(gd::VariablesContainer::SourceType::Local) {}
2023

2124
vector<gd::InstructionsList*> ForEachEvent::GetAllConditionsVectors() {
@@ -36,9 +39,14 @@ vector<pair<gd::Expression*, gd::ParameterMetadata> >
3639
ForEachEvent::GetAllExpressionsWithMetadata() {
3740
vector<pair<gd::Expression*, gd::ParameterMetadata> >
3841
allExpressionsWithMetadata;
39-
auto metadata = gd::ParameterMetadata().SetType("object");
42+
auto objectMetadata = gd::ParameterMetadata().SetType("object");
4043
allExpressionsWithMetadata.push_back(
41-
std::make_pair(&objectsToPick, metadata));
44+
std::make_pair(&objectsToPick, objectMetadata));
45+
auto numberMetadata = gd::ParameterMetadata().SetType("number");
46+
allExpressionsWithMetadata.push_back(
47+
std::make_pair(&orderBy, numberMetadata));
48+
allExpressionsWithMetadata.push_back(
49+
std::make_pair(&limit, numberMetadata));
4250

4351
return allExpressionsWithMetadata;
4452
}
@@ -62,9 +70,14 @@ vector<pair<const gd::Expression*, const gd::ParameterMetadata> >
6270
ForEachEvent::GetAllExpressionsWithMetadata() const {
6371
vector<pair<const gd::Expression*, const gd::ParameterMetadata> >
6472
allExpressionsWithMetadata;
65-
auto metadata = gd::ParameterMetadata().SetType("object");
73+
auto objectMetadata = gd::ParameterMetadata().SetType("object");
74+
allExpressionsWithMetadata.push_back(
75+
std::make_pair(&objectsToPick, objectMetadata));
76+
auto numberMetadata = gd::ParameterMetadata().SetType("number");
6677
allExpressionsWithMetadata.push_back(
67-
std::make_pair(&objectsToPick, metadata));
78+
std::make_pair(&orderBy, numberMetadata));
79+
allExpressionsWithMetadata.push_back(
80+
std::make_pair(&limit, numberMetadata));
6881

6982
return allExpressionsWithMetadata;
7083
}
@@ -85,6 +98,13 @@ void ForEachEvent::SerializeTo(SerializerElement& element) const {
8598
if (!loopIndexVariableName.empty()) {
8699
element.AddChild("loopIndexVariable").SetStringValue(loopIndexVariableName);
87100
}
101+
if (!orderBy.GetPlainString().empty()) {
102+
element.AddChild("orderBy").SetValue(orderBy.GetPlainString());
103+
element.AddChild("order").SetStringValue(order);
104+
if (!limit.GetPlainString().empty()) {
105+
element.AddChild("limit").SetValue(limit.GetPlainString());
106+
}
107+
}
88108
}
89109

90110
void ForEachEvent::UnserializeFrom(gd::Project& project,
@@ -111,6 +131,16 @@ void ForEachEvent::UnserializeFrom(gd::Project& project,
111131
element.HasChild("loopIndexVariable")
112132
? element.GetChild("loopIndexVariable").GetStringValue()
113133
: "";
134+
135+
orderBy = element.HasChild("orderBy")
136+
? gd::Expression(element.GetChild("orderBy").GetValue().GetString())
137+
: gd::Expression("");
138+
order = element.HasChild("order")
139+
? element.GetChild("order").GetStringValue()
140+
: "asc";
141+
limit = element.HasChild("limit")
142+
? gd::Expression(element.GetChild("limit").GetValue().GetString())
143+
: gd::Expression("");
114144
}
115145

116146
} // namespace gd

Core/GDCore/Events/Builtin/ForEachEvent.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ class GD_CORE_API ForEachEvent : public gd::BaseEvent {
5959
const gd::String& GetLoopIndexVariableName() const { return loopIndexVariableName; }
6060
void SetLoopIndexVariableName(const gd::String& name) { loopIndexVariableName = name; }
6161

62+
const gd::String& GetOrderBy() const {
63+
return orderBy.GetPlainString();
64+
};
65+
void SetOrderBy(gd::String orderBy_) {
66+
orderBy = gd::Expression(orderBy_);
67+
};
68+
const gd::Expression& GetOrderByExpression() const { return orderBy; };
69+
70+
const gd::String& GetOrder() const { return order; }
71+
void SetOrder(const gd::String& order_) { order = order_; }
72+
73+
const gd::String& GetLimit() const {
74+
return limit.GetPlainString();
75+
};
76+
void SetLimit(gd::String limit_) {
77+
limit = gd::Expression(limit_);
78+
};
79+
const gd::Expression& GetLimitExpression() const { return limit; };
80+
6281
virtual std::vector<const gd::InstructionsList*> GetAllConditionsVectors()
6382
const;
6483
virtual std::vector<const gd::InstructionsList*> GetAllActionsVectors() const;
@@ -81,6 +100,9 @@ class GD_CORE_API ForEachEvent : public gd::BaseEvent {
81100
gd::EventsList events;
82101
VariablesContainer variables;
83102
gd::String loopIndexVariableName;
103+
gd::Expression orderBy;
104+
gd::String order;
105+
gd::Expression limit;
84106
};
85107

86108
} // namespace gd

Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension(
1818
_("Advanced control features for functions made with events."),
1919
"Florian Rival",
2020
"Open source (MIT License)")
21+
.SetShortDescription("Copy object parameters between functions. Advanced event function control flow.")
2122
.SetCategory("Advanced");
2223
extension.AddInstructionOrExpressionGroupMetadata(_("Event functions"))
2324
.SetIcon("res/function32.png");

Core/GDCore/Extensions/Builtin/AsyncExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAsyncExtension(
1919
_("Functions that defer the execution of the events after it."),
2020
"Arthur Pacaud (arthuro555)",
2121
"Open source (MIT License)")
22+
.SetShortDescription("Asynchronous tasks that pause sub-event execution until resolved.")
2223
.SetCategory("Advanced");
2324
extension.AddInstructionOrExpressionGroupMetadata(_("Asynchronous functions"))
2425
.SetIcon("res/function32.png");

Core/GDCore/Extensions/Builtin/AudioExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAudioExtension(
1919
"files. They can be either long music or short sound effects."),
2020
"Florian Rival",
2121
"Open source (MIT License)")
22+
.SetShortDescription("Play/stop/pause sounds and music. Volume/pitch/loop/fades/offset, spatial audio on channels, preload/unload audio.")
2223
.SetExtensionHelpPath("/all-features/audio")
2324
.SetCategory("Audio");
2425
extension.AddInstructionOrExpressionGroupMetadata(_("Sounds and music"))

Core/GDCore/Extensions/Builtin/BaseObjectExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
2020
_("Common features that can be used for all objects in GDevelop."),
2121
"Florian Rival",
2222
"Open source (MIT License)")
23+
.SetShortDescription("Base object: position, angle, size, visibility, layer, z-order, distance, collision, variables, timers, effects.")
2324
.SetExtensionHelpPath("/objects/base_object/events");
2425
extension.AddInstructionOrExpressionGroupMetadata(_("Collision"))
2526
.SetIcon("res/conditions/collision24.png");

Core/GDCore/Extensions/Builtin/CameraExtension.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCameraExtension(
3232
"Florian Rival",
3333
"Open source (MIT License)")
3434
.SetCategory("Camera")
35+
.SetShortDescription("Layers, 2D/3D camera position/zoom/rotation, show/hide layers, layer effects, layer time scale.")
36+
.SetDimension("2D/3D")
3537
.SetExtensionHelpPath("/interface/scene-editor/layers-and-cameras");
3638
extension.AddInstructionOrExpressionGroupMetadata(_("Layers and cameras"))
3739
.SetIcon("res/conditions/camera24.png");

Core/GDCore/Extensions/Builtin/Capabilities/AnimatableExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAnimatableExtension(
2222
_("Actions and conditions for objects having animations (sprite, 3D models...)."),
2323
"Florian Rival",
2424
"Open source (MIT License)")
25+
.SetShortDescription("Play/pause/set animations by name or index. Speed, frame, loop, finished checks.")
2526
.SetExtensionHelpPath("/objects");
2627
extension.AddInstructionOrExpressionGroupMetadata(_("Objects with animations"))
2728
.SetIcon("res/actions/animation24.png");

Core/GDCore/Extensions/Builtin/Capabilities/EffectExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsEffectExtension(
2222
_("Actions/conditions to enable/disable and change parameters of visual effects applied on objects."),
2323
"Florian Rival",
2424
"Open source (MIT License)")
25+
.SetShortDescription("Enable/disable visual effects on objects. Change effect parameters at runtime.")
2526
.SetExtensionHelpPath("/objects");
2627
extension.AddInstructionOrExpressionGroupMetadata(_("Effects"))
2728
.SetIcon("res/actions/effect_black.svg");

Core/GDCore/Extensions/Builtin/Capabilities/FlippableExtension.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsFlippableExtension(
2222
_("Actions/conditions for objects which can be flipped horizontally or vertically."),
2323
"Florian Rival",
2424
"Open source (MIT License)")
25+
.SetShortDescription("Flip objects horizontally or vertically. Check flip state.")
2526
.SetExtensionHelpPath("/objects");
2627
extension.AddInstructionOrExpressionGroupMetadata(_("Effects"))
2728
.SetIcon("res/actions/effect_black.svg");

0 commit comments

Comments
 (0)