aboutsummaryrefslogtreecommitdiff
path: root/doc/base/classes.xml
diff options
context:
space:
mode:
authorKyle Luce2016-05-28 00:31:07 -0700
committerKyle Luce2016-07-10 16:06:57 -0700
commit605193b22fc61913d00b4ba4801c0283646b3a00 (patch)
tree52e73493b5b3f6dd57f4c3bd8ab6223fab2b1a3c /doc/base/classes.xml
parent864c0e84de9c2a2c5a030ec4ee167f3793e1e962 (diff)
downloadgodot-605193b22fc61913d00b4ba4801c0283646b3a00.tar.gz
godot-605193b22fc61913d00b4ba4801c0283646b3a00.tar.zst
godot-605193b22fc61913d00b4ba4801c0283646b3a00.zip
Conversion function for screen coords to local Canvas coords
- Useful if you need to Convert screen coords to the coordinate space of a CanvasItem, but don't have an associated InputEvent to use in #make_event_local. For example, if you have a particular point on the screen you'd like to project into World Space, for various reasons, you would use this function on the root of the scene. This is analogous to ray casting from screen space in 3D.
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r--doc/base/classes.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index cffbd6893..423a31c6f 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -7328,6 +7328,22 @@
</description>
</method>
<method name="update">
+ <method name="make_screen_coord_local" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="screen_point" type="Vector2">
+ </argument>
+ <description>
+ Take a 2d screen point and convert to 2D local coords relative to this Canvas
+ item. If this CanvasItem is the root of a Scene, its essentially the
+ world coords for that scene.
+ </description>
+ </method>
+ <method name="make_input_local" qualifiers="const">
+ <return type="InputEvent">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
+ </argument>
<description>
Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
</description>