Difference between revisions of "API Mouse.GetPosition2D"

From Flowcode Help
Jump to navigationJump to search
(XML import API auto-gen)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
wiki page name
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Gets the X/Y position of the mouse in screen coords
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPosition2D'''
 +
|-
 +
| colspan="2" | Gets the X/Y position of the mouse in screen coords 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | X
 +
|-
 +
| colspan="2" | Pixel screen coordinate from the left of the panel area 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | Y
 +
|-
 +
| colspan="2" | Pixel screen coordinate from the top of the panel area 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===Parameters===
+
==Detailed description==
''[[Variable types|LONG]] X''
+
This gets the X/Y position in screen units relative to the top left corner of the panel the mouse is over. If the mouse is not over a panel the last known position is used.
:''This parameter is returned back to the caller''
 
:Pixel screen coordinate from the left of the panel area
 
  
''[[Variable types|LONG]] Y''
 
:''This parameter is returned back to the caller''
 
:Pixel screen coordinate from the top of the panel area
 
  
===Return value===
+
Note that the coordinates returned from this call are ''not'' 3D coordinates.
[[Variable types|HANDLE]]
 
  
Returns the X/Y position of the mouse in screen coords
 
  
===Detailed description===
+
==Examples==
''No additional information''
+
===Calling in a calculation===
 
 
===Examples===
 
====Calling in a calculation====
 
 
* Declare a variable 'result' of type HANDLE
 
* Declare a variable 'result' of type HANDLE
* Add to a calculation icon: result = ::Mouse.GetPosition2D(return_x, return_y)
+
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetPosition2D(return_x, return_y)</pre>

Latest revision as of 11:55, 16 January 2023

Fc9-comp-macro.png GetPosition2D
Gets the X/Y position of the mouse in screen coords 
Fc9-s32-icon.png - LONG X
Pixel screen coordinate from the left of the panel area 
Fc9-s32-icon.png - LONG Y
Pixel screen coordinate from the top of the panel area 
Fc9-void-icon.png - NONE Return


Detailed description

This gets the X/Y position in screen units relative to the top left corner of the panel the mouse is over. If the mouse is not over a panel the last known position is used.


Note that the coordinates returned from this call are not 3D coordinates.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Mouse.GetPosition2D(return_x, return_y)