Difference between revisions of "API Mouse.GetClickSide"

From Flowcode Help
Jump to navigationJump to search
(XML import of updated API docs)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetClickSide'''
 +
|-
 +
| colspan="2" | Gets the side of the component clicked on, 0 to 5 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
<sidebar>API contents</sidebar>
+
==Detailed description==
Gets the side of the component clicked on, 0 to 7
+
This call retrieves the face of the bounding box intersected by the mouse. This is always the closest face to the screen.
  
<div style="width:25%; float:right" class="toc">
+
[[file:SIMAPI Mouse.GetPosition Faces.svg|thumb|none|Face numbers]]
====Class hierarchy====
+
The faces of the bounding box are ordered according to the following table:
[[API Mouse|Mouse]]
+
{|
:[[API Mouse|GetClickSide]]
+
|-
</div>
+
!Face
__TOC__
+
!Position
 
+
|-
==Parameters==
+
|0
''This function has no parameters''
+
|XY plane, Z=-1
 
+
|-
 
+
|1
==Return value==
+
|YZ plane, X=-1
[[Variable Types|BYTE]]
+
|-
 
+
|2
Returns the side of the component clicked on, 0 to 7
+
|XZ plane, Y=-1
 
+
|-
 
+
|3
==Detailed description==
+
|XZ plane, Y=1
''<span style="color:red;">No additional information</span>''
+
|-
 +
|4
 +
|YZ plane, X=1
 +
|-
 +
|5
 +
|XY plane, Z=1
 +
|}
 +
Each face, when added to the opposite face on the cube, adds up to 5 (so each YZ face = 1 + 4 = 5).
  
  
Line 29: Line 47:
 
* Declare a variable 'result' of type BYTE
 
* Declare a variable 'result' of type BYTE
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetClickSide()</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Mouse.GetClickSide()</pre>
 
''<span style="color:red;">No additional examples</span>''
 

Latest revision as of 11:55, 16 January 2023

Fc9-comp-macro.png GetClickSide
Gets the side of the component clicked on, 0 to 5 
Fc9-u8-icon.png - BYTE Return


Detailed description

This call retrieves the face of the bounding box intersected by the mouse. This is always the closest face to the screen.

Error creating thumbnail: sh: convert: command not found
Face numbers

The faces of the bounding box are ordered according to the following table:

Face Position
0 XY plane, Z=-1
1 YZ plane, X=-1
2 XZ plane, Y=-1
3 XZ plane, Y=1
4 YZ plane, X=1
5 XY plane, Z=1

Each face, when added to the opposite face on the cube, adds up to 5 (so each YZ face = 1 + 4 = 5).


Examples

Calling in a calculation

  • Declare a variable 'result' of type BYTE
  • Add to a calculation icon:
    result = ::Mouse.GetClickSide()