Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/classes/AcceptDialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
</method>
</methods>
<members>
<member name="clamp_to_embedder" type="bool" setter="set_clamp_to_embedder" getter="is_clamped_to_embedder" overrides="Window" default="true" />
<member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false">
Sets autowrapping for the text in the dialog.
</member>
Expand Down
4 changes: 4 additions & 0 deletions doc/classes/Window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,10 @@
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the window will have no borders.
</member>
<member name="clamp_to_embedder" type="bool" setter="set_clamp_to_embedder" getter="is_clamped_to_embedder" default="false">
If [code]true[/code], the [Window] position will be clamped so it cannot be dragged outside of the parent viewport.
[b]Note:[/b] This property only works with embedded windows.
</member>
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
</member>
Expand Down
4 changes: 4 additions & 0 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3422,6 +3422,9 @@ void Window::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_exclusive", "exclusive"), &Window::set_exclusive);
ClassDB::bind_method(D_METHOD("is_exclusive"), &Window::is_exclusive);

ClassDB::bind_method(D_METHOD("set_clamp_to_embedder", "clamp_to_embedder"), &Window::set_clamp_to_embedder);
ClassDB::bind_method(D_METHOD("is_clamped_to_embedder"), &Window::is_clamped_to_embedder);

ClassDB::bind_method(D_METHOD("set_unparent_when_invisible", "unparent"), &Window::set_unparent_when_invisible);

ClassDB::bind_method(D_METHOD("can_draw"), &Window::can_draw);
Expand Down Expand Up @@ -3570,6 +3573,7 @@ void Window::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transient"), "set_transient", "is_transient");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transient_to_focused"), "set_transient_to_focused", "is_transient_to_focused");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exclusive"), "set_exclusive", "is_exclusive");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clamp_to_embedder"), "set_clamp_to_embedder", "is_clamped_to_embedder");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "unresizable"), "set_flag", "get_flag", FLAG_RESIZE_DISABLED);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "borderless"), "set_flag", "get_flag", FLAG_BORDERLESS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "always_on_top"), "set_flag", "get_flag", FLAG_ALWAYS_ON_TOP);
Expand Down
Loading