AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.PointerPosValid

Method  -  Static

public static bool PointerPosValid(int pointerIndex = 0)

Parameters

pointerIndex int Index of the pointer to check

Returns

bool

True if pointer position is valid

Description

Returns true if the pointer position is valid. A pointer position may be undefined if there is no mouse connected, and there are no current touches. If pointerIndex is not specified then the mouse, or first finger touch position is checked. Alternatively, pointerIndex value of 0 to 3 can be specified to query a specific finger touch position validity.

Example

void Render() {
    if (RB.PointerPosValid()) {
        RB.DrawSprite("pointer"RB.PointerPos());
    }
}

See Also

RB.PointerPos

See Docs

Features - Pointer
Features - Multi-touch Support