Skip to content

Commit cc37127

Browse files
Improve Quick Customization flow (#6978)
* Simplify the number of objects suggested for replacing * Simplify the number of behavior properties suggested for tweaking * New section to update the in-game title * Simplify publication at the end of the flow
1 parent 364ec2e commit cc37127

File tree

57 files changed

+1686
-1116
lines changed

Some content is hidden

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

57 files changed

+1686
-1116
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
"__bits": "cpp",
115115
"__verbose_abort": "cpp",
116116
"variant": "cpp",
117-
"charconv": "cpp"
117+
"charconv": "cpp",
118+
"execution": "cpp"
118119
},
119120
"files.exclude": {
120121
"Binaries/*build*": true,

Core/GDCore/Project/BehaviorConfigurationContainer.h

+48-11
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
#include <map>
1010
#include <memory>
11-
#include "GDCore/Serialization/Serializer.h"
11+
1212
#include "GDCore/Project/QuickCustomization.h"
13+
#include "GDCore/Project/QuickCustomizationVisibilitiesContainer.h"
14+
#include "GDCore/Serialization/Serializer.h"
1315
#include "GDCore/String.h"
1416

1517
namespace gd {
@@ -32,12 +34,21 @@ namespace gd {
3234
*/
3335
class GD_CORE_API BehaviorConfigurationContainer {
3436
public:
35-
BehaviorConfigurationContainer() : folded(false), quickCustomizationVisibility(QuickCustomization::Visibility::Default){};
37+
BehaviorConfigurationContainer()
38+
: folded(false),
39+
quickCustomizationVisibility(QuickCustomization::Visibility::Default),
40+
propertiesQuickCustomizationVisibilities() {};
3641
BehaviorConfigurationContainer(const gd::String& name_,
3742
const gd::String& type_)
38-
: name(name_), type(type_), folded(false), quickCustomizationVisibility(QuickCustomization::Visibility::Default){};
43+
: name(name_),
44+
type(type_),
45+
folded(false),
46+
quickCustomizationVisibility(QuickCustomization::Visibility::Default),
47+
propertiesQuickCustomizationVisibilities() {};
3948
virtual ~BehaviorConfigurationContainer();
40-
virtual BehaviorConfigurationContainer* Clone() const { return new BehaviorConfigurationContainer(*this); }
49+
virtual BehaviorConfigurationContainer* Clone() const {
50+
return new BehaviorConfigurationContainer(*this);
51+
}
4152

4253
/**
4354
* \brief Return the name identifying the behavior
@@ -68,7 +79,6 @@ class GD_CORE_API BehaviorConfigurationContainer {
6879
*/
6980
std::map<gd::String, gd::PropertyDescriptor> GetProperties() const;
7081

71-
7282
/**
7383
* \brief Called when the IDE wants to update a custom property of the
7484
* behavior
@@ -84,9 +94,7 @@ class GD_CORE_API BehaviorConfigurationContainer {
8494
* \brief Called to initialize the content with the default properties
8595
* for the behavior.
8696
*/
87-
virtual void InitializeContent() {
88-
InitializeContent(content);
89-
};
97+
virtual void InitializeContent() { InitializeContent(content); };
9098

9199
/**
92100
* \brief Serialize the behavior content.
@@ -115,15 +123,42 @@ class GD_CORE_API BehaviorConfigurationContainer {
115123
*/
116124
bool IsFolded() const { return folded; }
117125

118-
void SetQuickCustomizationVisibility(QuickCustomization::Visibility visibility) {
126+
/**
127+
* @brief Set if the whole behavior should be visible or not in the Quick
128+
* Customization.
129+
*/
130+
void SetQuickCustomizationVisibility(
131+
QuickCustomization::Visibility visibility) {
119132
quickCustomizationVisibility = visibility;
120133
}
121134

135+
/**
136+
* @brief Get if the whole behavior should be visible or not in the Quick
137+
* Customization.
138+
*/
122139
QuickCustomization::Visibility GetQuickCustomizationVisibility() const {
123140
return quickCustomizationVisibility;
124141
}
125142

126-
protected:
143+
/**
144+
* @brief Get the map of properties and their visibility in the Quick
145+
* Customization.
146+
*/
147+
QuickCustomizationVisibilitiesContainer&
148+
GetPropertiesQuickCustomizationVisibilities() {
149+
return propertiesQuickCustomizationVisibilities;
150+
}
151+
152+
/**
153+
* @brief Get the map of properties and their visibility in the Quick
154+
* Customization.
155+
*/
156+
const QuickCustomizationVisibilitiesContainer&
157+
GetPropertiesQuickCustomizationVisibilities() const {
158+
return propertiesQuickCustomizationVisibilities;
159+
}
160+
161+
protected:
127162
/**
128163
* \brief Called when the IDE wants to know about the custom properties of the
129164
* behavior.
@@ -159,7 +194,7 @@ class GD_CORE_API BehaviorConfigurationContainer {
159194
* \brief Called to initialize the content with the default properties
160195
* for the behavior.
161196
*/
162-
virtual void InitializeContent(gd::SerializerElement& behaviorContent){};
197+
virtual void InitializeContent(gd::SerializerElement& behaviorContent) {};
163198

164199
private:
165200
gd::String name; ///< Name of the behavior
@@ -169,6 +204,8 @@ class GD_CORE_API BehaviorConfigurationContainer {
169204
gd::SerializerElement content; // Storage for the behavior properties
170205
bool folded;
171206
QuickCustomization::Visibility quickCustomizationVisibility;
207+
QuickCustomizationVisibilitiesContainer
208+
propertiesQuickCustomizationVisibilities;
172209
};
173210

174211
} // namespace gd

0 commit comments

Comments
 (0)