Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Extensions/AnchorBehavior/AnchorBehavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ std::map<gd::String, gd::PropertyDescriptor> AnchorBehavior::GetProperties(
.SetType("Boolean")
.SetLabel(_("Anchor relatively to original window size"))
.SetDescription(_("otherwise, objects are anchored according to the "
"window size when the object is created."));
"window size when the object is created."))
.SetAdvanced();

properties["leftEdgeAnchor"]
.SetValue(GetHorizontalAnchorAsString(static_cast<HorizontalAnchor>(
Expand All @@ -76,7 +77,8 @@ std::map<gd::String, gd::PropertyDescriptor> AnchorBehavior::GetProperties(
.AddChoice("WindowRight", _("Window right"))
.AddChoice("Proportional", _("Proportional"))
.SetLabel(_("Left edge"))
.SetDescription(_("Anchor the left edge of the object on X axis."));
.SetDescription(_("Anchor the left edge of the object on X axis."))
.SetAdvanced();

properties["rightEdgeAnchor"]
.SetValue(GetHorizontalAnchorAsString(static_cast<HorizontalAnchor>(
Expand All @@ -88,7 +90,8 @@ std::map<gd::String, gd::PropertyDescriptor> AnchorBehavior::GetProperties(
.AddChoice("WindowRight", _("Window right"))
.AddChoice("Proportional", _("Proportional"))
.SetLabel(_("Right edge"))
.SetDescription(_("Anchor the right edge of the object on X axis."));
.SetDescription(_("Anchor the right edge of the object on X axis."))
.SetAdvanced();

properties["topEdgeAnchor"]
.SetValue(GetVerticalAnchorAsString(static_cast<VerticalAnchor>(
Expand All @@ -100,7 +103,8 @@ std::map<gd::String, gd::PropertyDescriptor> AnchorBehavior::GetProperties(
.AddChoice("WindowBottom", _("Window bottom"))
.AddChoice("Proportional", _("Proportional"))
.SetLabel(_("Top edge"))
.SetDescription(_("Anchor the top edge of the object on Y axis."));
.SetDescription(_("Anchor the top edge of the object on Y axis."))
.SetAdvanced();

properties["bottomEdgeAnchor"]
.SetValue(GetVerticalAnchorAsString(static_cast<VerticalAnchor>(
Expand All @@ -112,7 +116,8 @@ std::map<gd::String, gd::PropertyDescriptor> AnchorBehavior::GetProperties(
.AddChoice("WindowBottom", _("Window bottom"))
.AddChoice("Proportional", _("Proportional"))
.SetLabel(_("Bottom edge"))
.SetDescription(_("Anchor the bottom edge of the object on Y axis."));
.SetDescription(_("Anchor the bottom edge of the object on Y axis."))
.SetAdvanced();

properties["useLegacyBottomAndRightAnchors"]
.SetLabel(_(
Expand Down
4 changes: 4 additions & 0 deletions newIDE/app/src/BehaviorsEditor/BehaviorsEditorService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import BehaviorPropertiesEditor from './Editors/BehaviorPropertiesEditor';
import Physics2Editor from './Editors/Physics2Editor';
import Physics3DEditor from './Editors/Physics3DEditor';
import AnchorBehaviorEditor from './Editors/AnchorBehaviorEditor';

/**
* A service returning editor components for each behavior type.
Expand All @@ -22,6 +23,9 @@ const BehaviorsEditorService = {
'Physics3D::Physics3DBehavior': {
component: Physics3DEditor,
},
'AnchorBehavior::AnchorBehavior': {
component: AnchorBehaviorEditor,
},
},
};

Expand Down
Loading