Browse Source

Merge pull request #92501 from timothyqiu/stretch-shrink-range-3.x

[3.x] Add range hint for `ViewportContainer.stretch_shrink`
lawnjelly 1 year ago
parent
commit
ab6395da40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/gui/viewport_container.cpp

+ 1 - 1
scene/gui/viewport_container.cpp

@@ -204,7 +204,7 @@ void ViewportContainer::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("get_stretch_shrink"), &ViewportContainer::get_stretch_shrink);
 
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stretch"), "set_stretch", "is_stretch_enabled");
-	ADD_PROPERTY(PropertyInfo(Variant::INT, "stretch_shrink"), "set_stretch_shrink", "get_stretch_shrink");
+	ADD_PROPERTY(PropertyInfo(Variant::INT, "stretch_shrink", PROPERTY_HINT_RANGE, "1,32,1,or_greater"), "set_stretch_shrink", "get_stretch_shrink");
 }
 
 ViewportContainer::ViewportContainer() {