mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Cleaning the code for PR
This commit is contained in:
@@ -90,8 +90,8 @@ bool CustomConfigurationHelper::UpdateProperty(
|
||||
|
||||
if (propertyType == "String" || propertyType == "Choice" ||
|
||||
propertyType == "Color" || propertyType == "Behavior" ||
|
||||
propertyType == "Resource" || propertyType == "LeaderboardId"
|
||||
|| propertyType == "AnimationName") {
|
||||
propertyType == "Resource" || propertyType == "LeaderboardId" ||
|
||||
propertyType == "AnimationName") {
|
||||
element.SetStringValue(newValue);
|
||||
} else if (propertyType == "Number") {
|
||||
element.SetDoubleValue(newValue.To<double>());
|
||||
|
@@ -63,7 +63,6 @@ const BehaviorPropertiesEditor = ({
|
||||
behavior.getProperties(),
|
||||
behavior => behavior.getProperties(),
|
||||
(behavior, name, value) => {
|
||||
console.log("bbb ", name, value);
|
||||
behavior.updateProperty(name, value);
|
||||
},
|
||||
object,
|
||||
@@ -112,7 +111,6 @@ const BehaviorPropertiesEditor = ({
|
||||
advancedPropertiesSchema.length > 0 ||
|
||||
deprecatedPropertiesSchema.length > 0 ? (
|
||||
<ColumnStackLayout expand noMargin>
|
||||
TEST123
|
||||
<PropertiesEditor
|
||||
|
||||
project={project}
|
||||
@@ -123,48 +121,47 @@ const BehaviorPropertiesEditor = ({
|
||||
/>
|
||||
{(advancedPropertiesSchema.length > 0 ||
|
||||
deprecatedPropertiesSchema.length > 0) && (
|
||||
"ici étaient les options avancées"
|
||||
// <Accordion
|
||||
// defaultExpanded={areAdvancedPropertiesExpandedByDefault}
|
||||
// noMargin
|
||||
// >
|
||||
// <AccordionHeader noMargin>
|
||||
// <Text size="sub-title">
|
||||
// <Trans>Advanced properties</Trans>
|
||||
// </Text>
|
||||
// </AccordionHeader>
|
||||
// <AccordionBody disableGutters>
|
||||
// <Column expand noMargin>
|
||||
// <PropertiesEditor
|
||||
// project={project}
|
||||
// schema={advancedPropertiesSchema}
|
||||
// instances={[behavior]}
|
||||
// onInstancesModified={onBehaviorUpdated}
|
||||
// resourceManagementProps={resourceManagementProps}
|
||||
// />
|
||||
// {deprecatedPropertiesSchema.length > 0 &&
|
||||
// (shouldShowDeprecatedProperties ? (
|
||||
// <PropertiesEditor
|
||||
// project={project}
|
||||
// schema={deprecatedPropertiesSchema}
|
||||
// instances={[behavior]}
|
||||
// onInstancesModified={onBehaviorUpdated}
|
||||
// resourceManagementProps={resourceManagementProps}
|
||||
// />
|
||||
// ) : (
|
||||
// <Line justifyContent="center">
|
||||
// <FlatButton
|
||||
// key="show-deprecated"
|
||||
// label={<Trans>Show deprecated options</Trans>}
|
||||
// onClick={() =>
|
||||
// setShouldShowDeprecatedProperties(true)
|
||||
// }
|
||||
// />
|
||||
// </Line>
|
||||
// ))}
|
||||
// </Column>
|
||||
// </AccordionBody>
|
||||
// </Accordion>
|
||||
<Accordion
|
||||
defaultExpanded={areAdvancedPropertiesExpandedByDefault}
|
||||
noMargin
|
||||
>
|
||||
<AccordionHeader noMargin>
|
||||
<Text size="sub-title">
|
||||
<Trans>Advanced properties</Trans>
|
||||
</Text>
|
||||
</AccordionHeader>
|
||||
<AccordionBody disableGutters>
|
||||
<Column expand noMargin>
|
||||
<PropertiesEditor
|
||||
project={project}
|
||||
schema={advancedPropertiesSchema}
|
||||
instances={[behavior]}
|
||||
onInstancesModified={onBehaviorUpdated}
|
||||
resourceManagementProps={resourceManagementProps}
|
||||
/>
|
||||
{deprecatedPropertiesSchema.length > 0 &&
|
||||
(shouldShowDeprecatedProperties ? (
|
||||
<PropertiesEditor
|
||||
project={project}
|
||||
schema={deprecatedPropertiesSchema}
|
||||
instances={[behavior]}
|
||||
onInstancesModified={onBehaviorUpdated}
|
||||
resourceManagementProps={resourceManagementProps}
|
||||
/>
|
||||
) : (
|
||||
<Line justifyContent="center">
|
||||
<FlatButton
|
||||
key="show-deprecated"
|
||||
label={<Trans>Show deprecated options</Trans>}
|
||||
onClick={() =>
|
||||
setShouldShowDeprecatedProperties(true)
|
||||
}
|
||||
/>
|
||||
</Line>
|
||||
))}
|
||||
</Column>
|
||||
</AccordionBody>
|
||||
</Accordion>
|
||||
)}
|
||||
</ColumnStackLayout>
|
||||
) : (
|
||||
|
@@ -239,9 +239,6 @@ const createField = (
|
||||
name,
|
||||
valueType: 'string',
|
||||
getValue: (instance: Instance): string => {
|
||||
console.log("aaa", getProperties(instance)
|
||||
.get(name)
|
||||
.getValue(), name);
|
||||
return getProperties(instance)
|
||||
.get(name)
|
||||
.getValue();
|
||||
|
@@ -128,7 +128,6 @@ const getFieldValue = ({
|
||||
if (!getValue) return null;
|
||||
|
||||
let value = getValue(instances[0]);
|
||||
console.log("ccc", value);
|
||||
for (var i = 1; i < instances.length; ++i) {
|
||||
if (value !== getValue(instances[i])) {
|
||||
if (typeof defaultValue !== 'undefined') value = defaultValue;
|
||||
|
Reference in New Issue
Block a user