Repository: 4ian/GDevelop
File: Extensions/PlatformBehavior/PlatformerObjectBehavior.cpp (C++)

Code before:
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Ledge"))
      .SetType("Number")
      .SetMeasurementUnit(gd::MeasurementUnit::GetPixel())
      .SetValue(
          gd::String::From(behaviorContent.GetDoubleAttribute("yGrabOffset")));
  properties["XGrabTolerance"]
      .SetLabel(_("Grab tolerance on X axis"))
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Ledge"))
      .SetType("Number")
      .SetMeasurementUnit(gd::MeasurementUnit::GetPixel())
      .SetValue(gd::String::From(
          behaviorContent.GetDoubleAttribute("xGrabTolerance", 10)));
  properties["UseLegacyTrajectory"]
      .SetLabel(_("Use frame rate dependent trajectories (deprecated, it's "
                  "recommended to leave this unchecked)"))
      .SetGroup(_("Deprecated options"))
      .SetDeprecated()
      .SetValue(behaviorContent.GetBoolAttribute("useLegacyTrajectory", true)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  properties["UseRepeatedJump"]
      .SetLabel(_("Allow the character to jump again when the key is held (deprecated, it's "
                  "recommended to leave this unchecked)"))
      .SetGroup(_("Deprecated options"))
      .SetDeprecated()
      .SetValue(behaviorContent.GetBoolAttribute("useRepeatedJump", true)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  properties["CanGoDownFromJumpthru"]
      .SetLabel(_("Can go down from jumpthru platforms"))
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Walk"))
      .SetValue(behaviorContent.GetBoolAttribute("canGoDownFromJumpthru", false)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  return properties;
}

bool PlatformerObjectBehavior::UpdateProperty(
    gd::SerializerElement& behaviorContent,
    const gd::String& name,
    const gd::String& value) {
  if (name == "IgnoreDefaultControls")
    behaviorContent.SetAttribute("ignoreDefaultControls", (value == "0"));
  else if (name == "CanGrabPlatforms")
    behaviorContent.SetAttribute("canGrabPlatforms", (value == "1"));

Review comment (suggestion):
```suggestion
      .SetLabel(_("Allows repeated jumps while holding the jump key (deprecated — best left unchecked)"))
```

Code after:
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Ledge"))
      .SetType("Number")
      .SetMeasurementUnit(gd::MeasurementUnit::GetPixel())
      .SetValue(
          gd::String::From(behaviorContent.GetDoubleAttribute("yGrabOffset")));
  properties["XGrabTolerance"]
      .SetLabel(_("Grab tolerance on X axis"))
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Ledge"))
      .SetType("Number")
      .SetMeasurementUnit(gd::MeasurementUnit::GetPixel())
      .SetValue(gd::String::From(
          behaviorContent.GetDoubleAttribute("xGrabTolerance", 10)));
  properties["UseLegacyTrajectory"]
      .SetLabel(_("Use frame rate dependent trajectories "
                  "(deprecated — best left unchecked)"))
      .SetGroup(_("Deprecated options"))
      .SetDeprecated()
      .SetValue(behaviorContent.GetBoolAttribute("useLegacyTrajectory", true)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  properties["UseRepeatedJump"]
      .SetLabel(_("Allows repeated jumps while holding the jump key "
                  "(deprecated — best left unchecked)"))
      .SetGroup(_("Deprecated options"))
      .SetDeprecated()
      .SetValue(behaviorContent.GetBoolAttribute("useRepeatedJump", true)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  properties["CanGoDownFromJumpthru"]
      .SetLabel(_("Can go down from jumpthru platforms"))
      .SetQuickCustomizationVisibility(gd::QuickCustomization::Hidden)
      .SetGroup(_("Walk"))
      .SetValue(behaviorContent.GetBoolAttribute("canGoDownFromJumpthru", false)
                    ? "true"
                    : "false")
      .SetType("Boolean");
  return properties;
}

bool PlatformerObjectBehavior::UpdateProperty(
    gd::SerializerElement& behaviorContent,
    const gd::String& name,
    const gd::String& value) {
  if (name == "IgnoreDefaultControls")
    behaviorContent.SetAttribute("ignoreDefaultControls", (value == "0"));
  else if (name == "CanGrabPlatforms")
    behaviorContent.SetAttribute("canGrabPlatforms", (value == "1"));