diff options
Diffstat (limited to 'doc/classes/Control.xml')
-rw-r--r-- | doc/classes/Control.xml | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 97fd584ed1..d084bd4db9 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -417,6 +417,19 @@ Returns the position and size of the control relative to the top-left corner of the parent Control. See [member position] and [member size]. </description> </method> + <method name="get_screen_position" qualifiers="const"> + <return type="Vector2" /> + <description> + Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]). + Example usage for showing a popup: + [codeblock] + popup_menu.position = get_screen_position() + get_local_mouse_position() + popup_menu.reset_size() + popup_menu.popup() + [/codeblock] + </description> + </method> <method name="get_theme_color" qualifiers="const"> <return type="Color" /> <argument index="0" name="name" type="StringName" /> @@ -652,7 +665,8 @@ <method name="is_drag_successful" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if drag operation is successful. + Returns [code]true[/code] if a drag operation is successful. Alternative to [method Viewport.gui_is_drag_successful]. + Best used with [constant Node.NOTIFICATION_DRAG_END]. </description> </method> <method name="is_layout_rtl" qualifiers="const"> @@ -930,9 +944,9 @@ </method> <method name="warp_mouse"> <return type="void" /> - <argument index="0" name="to_position" type="Vector2" /> + <argument index="0" name="position" type="Vector2" /> <description> - Moves the mouse cursor to [code]to_position[/code], relative to [member position] of this [Control]. + Moves the mouse cursor to [code]position[/code], relative to [member position] of this [Control]. </description> </method> </methods> @@ -1345,27 +1359,5 @@ <constant name="TEXT_DIRECTION_RTL" value="2" enum="TextDirection"> Right-to-left text writing direction. </constant> - <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser"> - Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description. - </constant> - <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser"> - BiDi override for URI. - </constant> - <constant name="STRUCTURED_TEXT_FILE" value="2" enum="StructuredTextParser"> - BiDi override for file path. - </constant> - <constant name="STRUCTURED_TEXT_EMAIL" value="3" enum="StructuredTextParser"> - BiDi override for email. - </constant> - <constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser"> - BiDi override for lists. - Structured text options: list separator [code]String[/code]. - </constant> - <constant name="STRUCTURED_TEXT_NONE" value="5" enum="StructuredTextParser"> - Use default Unicode BiDi algorithm. - </constant> - <constant name="STRUCTURED_TEXT_CUSTOM" value="6" enum="StructuredTextParser"> - User defined structured text BiDi override function. - </constant> </constants> </class> |