Display transform properties of contained controls

This commit is contained in:
kobewi 2022-11-30 15:08:39 +01:00
parent cd491c6e47
commit b65a3a52ac
1 changed files with 4 additions and 4 deletions

View File

@ -485,10 +485,10 @@ void Control::_validate_property(PropertyInfo &p_property) const {
} }
} else if (Object::cast_to<Container>(parent_node)) { } else if (Object::cast_to<Container>(parent_node)) {
// If the parent is a container, display only container-related properties. // If the parent is a container, display only container-related properties.
if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset" || if (p_property.name.begins_with("anchor_") || p_property.name.begins_with("offset_") || p_property.name.begins_with("grow_") || p_property.name == "anchors_preset") {
p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") { p_property.usage ^= PROPERTY_USAGE_DEFAULT;
p_property.usage ^= PROPERTY_USAGE_EDITOR; } else if (p_property.name == "position" || p_property.name == "rotation" || p_property.name == "scale" || p_property.name == "size" || p_property.name == "pivot_offset") {
p_property.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY;
} else if (p_property.name == "layout_mode") { } else if (p_property.name == "layout_mode") {
// Set the layout mode to be disabled with the proper value. // Set the layout mode to be disabled with the proper value.
p_property.hint_string = "Position,Anchors,Container,Uncontrolled"; p_property.hint_string = "Position,Anchors,Container,Uncontrolled";