Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheReticle
API provides access to the mouse cursor. The cursor may be an arrow or a reticle circle, depending
on Interface settings. The mouse cursor is visible in HMD mode if controllers aren't being used.Properties
Name | Type | Summary |
---|---|---|
allowMouseCapture | boolean |
Default Value: true |
depth | number |
The depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. |
maximumPosition | Vec2 |
The maximum reticle coordinates on the display device in desktop mode or the HUD surface
in HMD mode. (The minimum reticle coordinates on the desktop display device or HUD surface are |
mouseCaptured | boolean |
|
pointingAtSystemOverlay | boolean |
|
position | Vec2 |
The position of the cursor. This is the position relative to the Interface window in desktop mode, and the HUD surface in HMD mode. Note: The position values may be negative. |
scale | number |
The scale of the reticle circle in desktop mode, and the arrow and reticle circle in HMD mode. (Does not affect the size of the arrow in desktop mode.) Default Value: 1 |
visible | boolean |
Default Value: true |
Methods
Name | Return Value | Summary |
---|---|---|
getAllowMouseCapture
|
boolean |
Gets whether the mouse cursor will be captured when in HMD mode and the Interface window content (excluding menu items) has focus. When captured, the mouse cursor displays only in Interface, not on the rest of the desktop. |
getDepth
|
number |
Gets the depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. |
getMaximumPosition
|
Vec2 |
Gets the maximum reticle coordinates on the display device in desktop mode or the HUD surface in HMD mode. (The minimum
reticle coordinates on the desktop display device or HUD surface are |
getPosition
|
Vec2 |
Gets the position of the cursor. This is the position relative to the Interface window in desktop mode, and the HUD surface in HMD mode. Note: The position values may be negative. |
getScale
|
number |
Gets the scale of the reticle circle in desktop mode, and the arrow and reticle circle in HMD mode. (Does not affect the
size of the arrow in desktop mode.) The default scale is |
getVisible
|
boolean |
Gets whether the reticle circle is visible in desktop mode, or the arrow or reticle circle are visible in HMD mode. |
isMouseCaptured
|
boolean |
Checks whether the mouse cursor is captured, displaying only in Interface and not on the rest of the desktop. The mouse
cursor is captured when in HMD mode and the Interface window content (excluding menu items) has focus, if capturing is
enabled ( |
isPointingAtSystemOverlay
|
boolean |
Gets whether the mouse cursor is pointing at UI in the Interface window in desktop mode or on the HUD surface in HMD mode. |
setAllowMouseCapture
|
None |
Sets whether the mouse cursor will be captured when in HMD mode and the Interface window content (excluding menu items) has focus. When captured, the mouse cursor displays only in Interface, not on the rest of desktop. |
setDepth
|
None |
Sets the depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. |
setPosition
|
None |
Sets the position of the cursor. This is the position relative to the Interface window in desktop mode, and the HUD surface in HMD mode. Note: The position values may be negative. |
setScale
|
None |
Sets the scale of the reticle circle in desktop mode, and the arrow and reticle circle in HMD mode. (Does not affect the
size of the arrow in desktop mode.) The default scale is |
setVisible
|
None |
Sets whether the reticle circle is visible in desktop mode, or the arrow or reticle circle are visible in HMD mode. |
Method Details
(static) getAllowMouseCapture( ) → {boolean}
Returns: true if the mouse cursor will be captured when in HMD mode and the Interface window
content has focus, false if the mouse cursor will not be captured.
|
---|
Gets whether the mouse cursor will be captured when in HMD mode and the Interface window content (excluding menu items) has focus. When captured, the mouse cursor displays only in Interface, not on the rest of the desktop. |
(static) getDepth( ) → {number}
Returns: The depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. |
---|
Gets the depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. |
(static) getMaximumPosition( ) → {Vec2}
Returns: The maximum reticle coordinates on the display device in desktop mode or the HUD surface in HMD mode. |
---|
Gets the maximum reticle coordinates on the display device in desktop mode or the HUD surface in HMD mode. (The minimum
reticle coordinates on the desktop display device or HUD surface are |
(static) getPosition( ) → {Vec2}
Returns: The position of the cursor. |
---|
Gets the position of the cursor. This is the position relative to the Interface window in desktop mode, and the HUD surface in HMD mode. Note: The position values may be negative. |
(static) getScale( ) → {number}
Returns: The scale of the reticle. |
---|
Gets the scale of the reticle circle in desktop mode, and the arrow and reticle circle in HMD mode. (Does not affect the
size of the arrow in desktop mode.) The default scale is |
(static) getVisible( ) → {boolean}
Returns: true if the reticle circle is visible in desktop mode, and the arrow or
reticle circle are visible in HMD mode; false otherwise. (The mouse pointer is always visible in
desktop mode.)
|
---|
Gets whether the reticle circle is visible in desktop mode, or the arrow or reticle circle are visible in HMD mode. |
(static) isMouseCaptured( ) → {boolean}
Returns: true if the mouse cursor is captured, displaying only in Interface and not on the
desktop.
|
---|
Checks whether the mouse cursor is captured, displaying only in Interface and not on the rest of the desktop. The mouse
cursor is captured when in HMD mode and the Interface window content (excluding menu items) has focus, if capturing is
enabled ( |
(static) isPointingAtSystemOverlay( ) → {boolean}
Returns: true if the mouse cursor is pointing at UI in the Interface window in desktop mode or on
the HUD surface in HMD mode, false if it isn't.
|
---|
Gets whether the mouse cursor is pointing at UI in the Interface window in desktop mode or on the HUD surface in HMD mode. |
(static) setAllowMouseCapture( allowMouseCaptured ) | ||||||
---|---|---|---|---|---|---|
Sets whether the mouse cursor will be captured when in HMD mode and the Interface window content (excluding menu items) has focus. When captured, the mouse cursor displays only in Interface, not on the rest of desktop. Parameters
|
(static) setDepth( depth ) | ||||||
---|---|---|---|---|---|---|
Sets the depth (distance) that the reticle is displayed at relative to the HMD view, in HMD mode. Parameters
|
(static) setPosition( position ) | ||||||
---|---|---|---|---|---|---|
Sets the position of the cursor. This is the position relative to the Interface window in desktop mode, and the HUD surface in HMD mode. Note: The position values may be negative. Parameters
|
(static) setScale( scale ) | ||||||
---|---|---|---|---|---|---|
Sets the scale of the reticle circle in desktop mode, and the arrow and reticle circle in HMD mode. (Does not affect the
size of the arrow in desktop mode.) The default scale is Parameters
|
(static) setVisible( visible ) | ||||||
---|---|---|---|---|---|---|
Sets whether the reticle circle is visible in desktop mode, or the arrow or reticle circle are visible in HMD mode. Parameters
|