PowerQuest 0.18.9
ICursor Interface Reference

Detailed Description

Cursor: contains functions and data for manipulating the mouse cursor - Interface to QuestCursor.

Properties

bool Visible [get, set]
 Shows or hides the mouse cursor. More...
 
string AnimationOverride [get, set]
 Gets/Sets a cursor animation that overrides any other. (ones set in the prop, etc) More...
 
string AnimationClickable [get, set]
 Gets/Sets the default animation that plays when mouse is over a clickable object. More...
 
string AnimationNonClickable [get, set]
 Gets/Sets the default animation that plays when mouse is NOT over a clickable object. More...
 
string AnimationUseInv [get, set]
 Gets/Sets the default animation that plays when there's an active inventory item (if not using inventory items) More...
 
string AnimationOverGui [get, set]
 Gets/Sets the default animation that plays when the mosue is over gui. More...
 
bool HideWhenBlocking [get, set]
 Gets/Sets whether the mouse should be hidden when there's a blocking script. More...
 
bool NoneCursorActive [get]
 Returns true if cursor is hovering over something with a cursor set to "None". More...
 
bool InventoryCursorOverridden [get]
 Returns true if cursor is hovering over something with a cursor set as one of the "Inventory Override Anims" set in the inspector. Used for "exit" hotspot arrow cursors, etc. More...
 
Vector2 PositionOverride [get, set]
 Gets/Sets the mouse cursor position, overiding the actual position of the mouse. Reset with "ClearPositionOverride()". More...
 
bool HasPositionOverride [get]
 True if SetPositionOverride() was called or PositionOverride was set. More...
 
Color InventoryOutlineColor [get, set]
 Outline colour used to highlight inventory (pixel art only) More...
 

Public Member Functions

void ResetAnimationOverride ()
 Disables any AnimationOverride, returning to default behaviour. More...
 
void PlayAnimation (string anim)
 Plays an animation on the cursor, returning to default once the animation ends. More...
 
void StopAnimation ()
 Stops any playing animation, returning to default behaviour. More...
 
void SetPositionOverride (Vector2 position)
 Sets the mouse cursor position, overiding the actual position of the mouse. Reset with "ClearPositionOverride()". More...
 
void ClearPositionOverride ()
 Removes any position override from the cursor, returning it to normal mouse position. More...
 
QuestCursorComponent GetInstance ()
 Gets the QuestCursorComponent of the cursor's game object. More...
 

Property Documentation

◆ Visible

bool Visible
getset

Shows or hides the mouse cursor.

◆ AnimationOverride

string AnimationOverride
getset

Gets/Sets a cursor animation that overrides any other. (ones set in the prop, etc)

◆ AnimationClickable

string AnimationClickable
getset

Gets/Sets the default animation that plays when mouse is over a clickable object.

◆ AnimationNonClickable

string AnimationNonClickable
getset

Gets/Sets the default animation that plays when mouse is NOT over a clickable object.

◆ AnimationUseInv

string AnimationUseInv
getset

Gets/Sets the default animation that plays when there's an active inventory item (if not using inventory items)

◆ AnimationOverGui

string AnimationOverGui
getset

Gets/Sets the default animation that plays when the mosue is over gui.

◆ HideWhenBlocking

bool HideWhenBlocking
getset

Gets/Sets whether the mouse should be hidden when there's a blocking script.

◆ NoneCursorActive

bool NoneCursorActive
get

Returns true if cursor is hovering over something with a cursor set to "None".

◆ InventoryCursorOverridden

bool InventoryCursorOverridden
get

Returns true if cursor is hovering over something with a cursor set as one of the "Inventory Override Anims" set in the inspector. Used for "exit" hotspot arrow cursors, etc.

◆ PositionOverride

Vector2 PositionOverride
getset

Gets/Sets the mouse cursor position, overiding the actual position of the mouse. Reset with "ClearPositionOverride()".

◆ HasPositionOverride

bool HasPositionOverride
get

True if SetPositionOverride() was called or PositionOverride was set.

◆ InventoryOutlineColor

Color InventoryOutlineColor
getset

Outline colour used to highlight inventory (pixel art only)

Member Function Documentation

◆ ResetAnimationOverride()

void ResetAnimationOverride ( )

Disables any AnimationOverride, returning to default behaviour.

◆ PlayAnimation()

void PlayAnimation ( string  anim)

Plays an animation on the cursor, returning to default once the animation ends.

◆ StopAnimation()

void StopAnimation ( )

Stops any playing animation, returning to default behaviour.

◆ SetPositionOverride()

void SetPositionOverride ( Vector2  position)

Sets the mouse cursor position, overiding the actual position of the mouse. Reset with "ClearPositionOverride()".

◆ ClearPositionOverride()

void ClearPositionOverride ( )

Removes any position override from the cursor, returning it to normal mouse position.

◆ GetInstance()

QuestCursorComponent GetInstance ( )

Gets the QuestCursorComponent of the cursor's game object.