You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Hide extra options from various nodes if they're not enabled
This commit is contained in:
@@ -231,6 +231,7 @@ void CanvasLayer::set_follow_viewport(bool p_enable) {
|
||||
|
||||
follow_viewport = p_enable;
|
||||
_update_follow_viewport();
|
||||
notify_property_list_changed();
|
||||
}
|
||||
|
||||
bool CanvasLayer::is_following_viewport() const {
|
||||
@@ -257,6 +258,14 @@ void CanvasLayer::_update_follow_viewport(bool p_force_exit) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void CanvasLayer::_validate_property(PropertyInfo &property) const {
|
||||
if (!follow_viewport && property.name == "follow_viewport_scale") {
|
||||
property.usage = PROPERTY_USAGE_NOEDITOR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void CanvasLayer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_layer", "layer"), &CanvasLayer::set_layer);
|
||||
ClassDB::bind_method(D_METHOD("get_layer"), &CanvasLayer::get_layer);
|
||||
|
||||
Reference in New Issue
Block a user