API Mouse.GetClickSide: Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetClickSide''' | ||
|- | |- | ||
| colspan="2" | Gets the side of the component clicked on, 0 to 5 | | colspan="2" | Gets the side of the component clicked on, 0 to 5 | ||
| Line 47: | 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> | ||
Latest revision as of 14:11, 13 July 2026
| GetClickSide | |
| Gets the side of the component clicked on, 0 to 5 | |
| 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.
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()