Hide more options of disabled properties
This commit is contained in:
@@ -569,6 +569,7 @@ void Camera2D::_set_old_smoothing(float p_enable) {
|
||||
|
||||
void Camera2D::set_enable_follow_smoothing(bool p_enabled) {
|
||||
smoothing_enabled = p_enabled;
|
||||
notify_property_list_changed();
|
||||
}
|
||||
|
||||
bool Camera2D::is_follow_smoothing_enabled() const {
|
||||
@@ -642,6 +643,12 @@ bool Camera2D::is_margin_drawing_enabled() const {
|
||||
return margin_drawing_enabled;
|
||||
}
|
||||
|
||||
void Camera2D::_validate_property(PropertyInfo &property) const {
|
||||
if (!smoothing_enabled && property.name == "smoothing_speed") {
|
||||
property.usage = PROPERTY_USAGE_NOEDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
void Camera2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_offset", "offset"), &Camera2D::set_offset);
|
||||
ClassDB::bind_method(D_METHOD("get_offset"), &Camera2D::get_offset);
|
||||
|
||||
Reference in New Issue
Block a user