1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Add property value pinning

This commit is contained in:
Pedro J. Estébanez
2021-10-26 21:12:35 +02:00
parent 76b7d23a10
commit 4dba25b3ff
14 changed files with 335 additions and 21 deletions

View File

@@ -306,6 +306,16 @@ void CanvasLayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale");
}
#ifdef TOOLS_ENABLED
StringName CanvasLayer::get_property_store_alias(const StringName &p_property) const {
if (p_property == "rotation_degrees") {
return "rotation";
} else {
return Node::get_property_store_alias(p_property);
}
}
#endif
CanvasLayer::CanvasLayer() {
vp = nullptr;
scale = Vector2(1, 1);