Expose "get_modal_stack_top()" to GDScript

This commit is contained in:
Michael Alexsander Silva Dias 2018-09-14 16:35:52 -03:00
parent 8f33542ac3
commit 585ad5c8ea
2 changed files with 9 additions and 0 deletions

View file

@ -46,6 +46,13 @@
Returns the total transform of the viewport. Returns the total transform of the viewport.
</description> </description>
</method> </method>
<method name="get_modal_stack_top" qualifiers="const">
<return type="Control">
</return>
<description>
Returns the topmost modal in the stack.
</description>
</method>
<method name="get_mouse_position" qualifiers="const"> <method name="get_mouse_position" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>

View file

@ -2789,6 +2789,8 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("gui_get_drag_data"), &Viewport::gui_get_drag_data); ClassDB::bind_method(D_METHOD("gui_get_drag_data"), &Viewport::gui_get_drag_data);
ClassDB::bind_method(D_METHOD("gui_is_dragging"), &Viewport::gui_is_dragging); ClassDB::bind_method(D_METHOD("gui_is_dragging"), &Viewport::gui_is_dragging);
ClassDB::bind_method(D_METHOD("get_modal_stack_top"), &Viewport::get_modal_stack_top);
ClassDB::bind_method(D_METHOD("set_disable_input", "disable"), &Viewport::set_disable_input); ClassDB::bind_method(D_METHOD("set_disable_input", "disable"), &Viewport::set_disable_input);
ClassDB::bind_method(D_METHOD("is_input_disabled"), &Viewport::is_input_disabled); ClassDB::bind_method(D_METHOD("is_input_disabled"), &Viewport::is_input_disabled);