Merge pull request #31368 from supagu/master

Exposed set_as_minsize to gdscript
This commit is contained in:
Rémi Verschelde 2019-08-14 11:35:17 +02:00 committed by GitHub
commit 9b7c126352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,13 @@
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen. Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
</description> </description>
</method> </method>
<method name="set_as_minsize">
<return type="void">
</return>
<description>
Shrink popup to keep to the minimum size of content.
</description>
</method>
</methods> </methods>
<members> <members>
<member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">

View File

@ -207,6 +207,7 @@ bool Popup::is_exclusive() const {
void Popup::_bind_methods() { void Popup::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_as_minsize"), &Popup::set_as_minsize);
ClassDB::bind_method(D_METHOD("popup_centered", "size"), &Popup::popup_centered, DEFVAL(Size2())); ClassDB::bind_method(D_METHOD("popup_centered", "size"), &Popup::popup_centered, DEFVAL(Size2()));
ClassDB::bind_method(D_METHOD("popup_centered_ratio", "ratio"), &Popup::popup_centered_ratio, DEFVAL(0.75)); ClassDB::bind_method(D_METHOD("popup_centered_ratio", "ratio"), &Popup::popup_centered_ratio, DEFVAL(0.75));
ClassDB::bind_method(D_METHOD("popup_centered_minsize", "minsize"), &Popup::popup_centered_minsize, DEFVAL(Size2())); ClassDB::bind_method(D_METHOD("popup_centered_minsize", "minsize"), &Popup::popup_centered_minsize, DEFVAL(Size2()));