Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.CursorManager Class Reference
Inheritance diagram for AC.CursorManager:

Public Member Functions

void ShowGUI ()
 
bool AllowUnhandledIcons ()
 Checks if the current settings allow for unhandled variants of each cursor icon to be available. More...
 
string[] GetLabelsArray (bool includeNone=false)
 Gets an array of the CursorIcon labels defined in cursorIcons. More...
 
string GetLabelFromID (int _ID, int languageNumber)
 Gets a label of the CursorIcon defined in cursorIcons. More...
 
CursorIcon GetCursorIconFromID (int _ID)
 Gets a CursorIcon defined in cursorIcons. More...
 
int GetIntFromID (int _ID)
 Gets the index number (in cursorIcons) of a CursorIcon. More...
 
ActionListAsset GetUnhandledInteraction (int _ID)
 Gets the ActionListAsset that is used as a CursorIcon's unhandled event. More...
 
GUIStyle GetDisplayCountStyle ()
 

Public Attributes

CursorRendering cursorRendering = CursorRendering.Software
 
CursorMode cursorMode = CursorMode.Auto
 
GameObject uiCursorPrefab = null
 
CursorDisplay cursorDisplay = CursorDisplay.Always
 
bool allowMainCursor = false
 
bool lockSystemCursor = true
 
bool keepCursorWithinScreen = true
 
bool allowWalkCursor = false
 
bool syncWalkCursorWithInteraction = false
 
int walkCursor_ID = 0
 
bool addWalkPrefix = false
 
HotspotPrefix walkPrefix = new HotspotPrefix ("Walk to")
 
bool addHotspotPrefix = false
 
bool allowInteractionCursor = false
 
bool allowInteractionCursorForInventory = false
 
bool cycleCursors = false
 
bool onlyAnimateOverHotspots = false
 
bool leftClickExamine = false
 
bool onlyWalkWhenOverNavMesh = false
 
bool onlyShowInventoryLabelOverHotspots = false
 
float inventoryCursorSize = 0.06f
 
bool allowIconInput = true
 
CursorIconBase waitIcon = new CursorIcon ()
 
CursorIconBase pointerIcon = new CursorIcon ()
 
CursorIconBase walkIcon = new CursorIcon ()
 
CursorIconBase mouseOverIcon = new CursorIcon ()
 
CursorIconBase cameraDragIcon = new CursorIcon ()
 
InventoryHandling inventoryHandling = InventoryHandling.ChangeCursor
 
HotspotPrefix hotspotPrefix1 = new HotspotPrefix ("Use")
 
HotspotPrefix hotspotPrefix2 = new HotspotPrefix ("on")
 
HotspotPrefix hotspotPrefix3 = new HotspotPrefix ("Give")
 
HotspotPrefix hotspotPrefix4 = new HotspotPrefix ("to")
 
float displayCountSize = 1.6f
 
Font displayCountFont = null
 
TextEffects displayCountTextEffects = TextEffects.None
 
Color displayCountColor = Color.white
 
Vector2 inventoryCursorOffset = new Vector2 (0f, 0f)
 
List< CursorIconcursorIcons = new List<CursorIcon>()
 
List< ActionListAssetunhandledCursorInteractions = new List<ActionListAsset>()
 
bool passUnhandledHotspotAsParameter
 
bool onlyShowCursorLabelOverHotspots = false
 
bool allowCursorCyclingWhenPaused = false
 
LookUseCursorAction lookUseCursorAction = LookUseCursorAction.DisplayBothSideBySide
 
int lookCursor_ID = 0
 
bool hideCursorWhenDraggingMoveables = true
 
bool forceCursorInEditor = true
 

Detailed Description

Handles the "Cursor" tab of the Game Editor window. All possible cursors that the mouse can have (excluding inventory items) are defined here, as are the various ways in which these cursors are displayed.

Member Function Documentation

◆ AllowUnhandledIcons()

bool AC.CursorManager.AllowUnhandledIcons ( )

Checks if the current settings allow for unhandled variants of each cursor icon to be available.

Returns
Tr if the current settings allow for unhandled variants of each cursor icon to be available.

◆ GetCursorIconFromID()

CursorIcon AC.CursorManager.GetCursorIconFromID ( int  _ID)

Gets a CursorIcon defined in cursorIcons.

Parameters
_IDThe ID number of the CursorIcon to find
Returns
The CursorIcon

◆ GetIntFromID()

int AC.CursorManager.GetIntFromID ( int  _ID)

Gets the index number (in cursorIcons) of a CursorIcon.

Parameters
_IDThe ID number of the CursorIcon to find
Returns
The index number (in cursorIcons) of the CursorIcon

◆ GetLabelFromID()

string AC.CursorManager.GetLabelFromID ( int  _ID,
int  languageNumber 
)

Gets a label of the CursorIcon defined in cursorIcons.

Parameters
_IDThe ID number of the CursorIcon to find
languageNumberThe index number of the language to get the label in
Returns
The label of the CursorIcon

◆ GetLabelsArray()

string [] AC.CursorManager.GetLabelsArray ( bool  includeNone = false)

Gets an array of the CursorIcon labels defined in cursorIcons.

Parameters
includeNoneIf True, then the array will begin with a (none) option.
Returns
An array of the CursorIcon labels defined in cursorIcons

◆ GetUnhandledInteraction()

ActionListAsset AC.CursorManager.GetUnhandledInteraction ( int  _ID)

Gets the ActionListAsset that is used as a CursorIcon's unhandled event.

Parameters
_IDThe ID number of the CursorIcon to find
Returns
The ActionListAsset that is used as the CursorIcon's unhandled event

◆ ShowGUI()

void AC.CursorManager.ShowGUI ( )

Shows the GUI.

Member Data Documentation

◆ addHotspotPrefix

bool AC.CursorManager.addHotspotPrefix = false

If True, then the Cursor's interaction verb will prefix the Hotspot label when hovering over Hotspots

◆ addWalkPrefix

bool AC.CursorManager.addWalkPrefix = false

If True, then a prefix can be added to the Hotspot label when in "walk mode"

◆ allowCursorCyclingWhenPaused

bool AC.CursorManager.allowCursorCyclingWhenPaused = false

If True, then the cursor can be cycled while the game is paused, if the current interaction method supports it

◆ allowIconInput

bool AC.CursorManager.allowIconInput = true

If True, and interactionMethod = AC_InteractionMethod.ChooseInteractionThenHotspot in SettingsManager, then the player can switch the active "interaction" icon by invoking a specific input

◆ allowInteractionCursor

bool AC.CursorManager.allowInteractionCursor = false

If True, then the cursor will be controlled by the current Interaction when hovering over a Hotspot

◆ allowInteractionCursorForInventory

bool AC.CursorManager.allowInteractionCursorForInventory = false

If True, then the cursor will be controlled by the current Interaction when hovering over an inventory item (see InvItem)

◆ allowMainCursor

bool AC.CursorManager.allowMainCursor = false

If True, then the system's default hardware cursor will replaced with a custom one

◆ allowWalkCursor

bool AC.CursorManager.allowWalkCursor = false

If True, then a separate cursor will display when in "walk mode"

◆ cameraDragIcon

CursorIconBase AC.CursorManager.cameraDragIcon = new CursorIcon ()

The cursor while the cursor is being used to manipulate a drag-controlled camera

◆ cursorDisplay

CursorDisplay AC.CursorManager.cursorDisplay = CursorDisplay.Always

The rule that defines when the main cursor is shown (Always, Never, OnlyWhenPaused)

◆ cursorIcons

List<CursorIcon> AC.CursorManager.cursorIcons = new List<CursorIcon>()

A List of all CursorIcon instances that represent the various Interaction types

◆ cursorMode

CursorMode AC.CursorManager.cursorMode = CursorMode.Auto

The mode to use cursorRendering = CursorRendering.Hardware

◆ cursorRendering

CursorRendering AC.CursorManager.cursorRendering = CursorRendering.Software

The rendering method of all cursors (Software, Hardware, UnityUI)

◆ cycleCursors

bool AC.CursorManager.cycleCursors = false

If True, then cursor modes can by clicked by right-clicking, if interactionMethod = AC_InteractionMethod.ChooseInteractionThenHotspot in SettingsManager

◆ displayCountColor

Color AC.CursorManager.displayCountColor = Color.white

The colour to use when displaying the count of the selected item instance

◆ displayCountFont

Font AC.CursorManager.displayCountFont = null

The font when displaying the count of the selected item instance

◆ displayCountSize

float AC.CursorManager.displayCountSize = 1.6f

How large to display the count of the selected item instance

◆ displayCountTextEffects

TextEffects AC.CursorManager.displayCountTextEffects = TextEffects.None

The text effects when displaying the count of the selected item instance

◆ hideCursorWhenDraggingMoveables

bool AC.CursorManager.hideCursorWhenDraggingMoveables = true

If True, the cursor will be hidden when manipulating draggable objects

◆ hotspotPrefix1

HotspotPrefix AC.CursorManager.hotspotPrefix1 = new HotspotPrefix ("Use")

The "Use" in the syntax "Use item on Hotspot"

◆ hotspotPrefix2

HotspotPrefix AC.CursorManager.hotspotPrefix2 = new HotspotPrefix ("on")

The "on" in the syntax "Use item on Hotspot"

◆ hotspotPrefix3

HotspotPrefix AC.CursorManager.hotspotPrefix3 = new HotspotPrefix ("Give")

The "Give" in the syntax "Give item to NPC"

◆ hotspotPrefix4

HotspotPrefix AC.CursorManager.hotspotPrefix4 = new HotspotPrefix ("to")

The "to" in the syntax "Give item to NPC"

◆ inventoryCursorOffset

Vector2 AC.CursorManager.inventoryCursorOffset = new Vector2 (0f, 0f)

The default offset to apply to inventory cursors, when using Software rendering, and not overridden by an Inventory Item's Cursor texture

◆ inventoryCursorSize

float AC.CursorManager.inventoryCursorSize = 0.06f

The size of selected inventory item graphics when used as a cursor

◆ inventoryHandling

InventoryHandling AC.CursorManager.inventoryHandling = InventoryHandling.ChangeCursor

What happens to the cursor when an inventory item is selected (ChangeCursor, ChangeHotspotLabel, ChangeCursorAndHotspotLabel)

◆ keepCursorWithinScreen

bool AC.CursorManager.keepCursorWithinScreen = true

If True, then the cursor will always be kept within the boundary of the game window

◆ leftClickExamine

bool AC.CursorManager.leftClickExamine = false

If True, then left-clicking a Hotspot will examine it if no "use" Interaction exists (if interactionMethod = AC_InteractionMethod.ContextSensitive in SettingsManager)

◆ lockSystemCursor

bool AC.CursorManager.lockSystemCursor = true

If True, and cursorRendering = CursorRendering.Software, the system cursor will be locked when the AC cursor is (this is always true when using Hardware cursor rendering)

◆ lookCursor_ID

int AC.CursorManager.lookCursor_ID = 0

The ID number of the CursorIcon (in cursorIcons) that represents the "Examine" Interaction

◆ lookUseCursorAction

LookUseCursorAction AC.CursorManager.lookUseCursorAction = LookUseCursorAction.DisplayBothSideBySide

What happens when hovering over a Hotspot that has both a Use and Examine Interaction (DisplayUseIcon, DisplayBothSideBySide, RightClickCyclesModes)

◆ mouseOverIcon

CursorIconBase AC.CursorManager.mouseOverIcon = new CursorIcon ()

The cursor when hovering over a Hotspot

◆ onlyAnimateOverHotspots

bool AC.CursorManager.onlyAnimateOverHotspots = false

If True, and interactionMethod = AC_InteractionMethod.ChooseInteractionThenHotspot in SettingsManager, then animated cursors will only animate if the cursor is over a Hotspot

◆ onlyShowCursorLabelOverHotspots

bool AC.CursorManager.onlyShowCursorLabelOverHotspots = false

If True, then Hotspot labels will not show when no inventory item is selected unless the cursor is over another inventory item or a Hotspot

◆ onlyShowInventoryLabelOverHotspots

bool AC.CursorManager.onlyShowInventoryLabelOverHotspots = false

If True, then Hotspot labels will not show when an inventory item is selected unless the cursor is over another inventory item or a Hotspot

◆ onlyWalkWhenOverNavMesh

bool AC.CursorManager.onlyWalkWhenOverNavMesh = false

If True, and allowWalkCursor = True, then the walk cursor will only show when the cursor is hovering over a NavMesh

◆ passUnhandledHotspotAsParameter

bool AC.CursorManager.passUnhandledHotspotAsParameter

If True, the Hotspot clicked on to initiate unhandledCursorInteractions will be sent as a parameter to the ActionListAsset

◆ pointerIcon

CursorIconBase AC.CursorManager.pointerIcon = new CursorIcon ()

The game's default cursor

◆ uiCursorPrefab

GameObject AC.CursorManager.uiCursorPrefab = null

The cursor prefab to spawn if cursorRendering = CursorRendering.Hardware

◆ unhandledCursorInteractions

List<ActionListAsset> AC.CursorManager.unhandledCursorInteractions = new List<ActionListAsset>()

A List of ActionListAsset files that get run when an unhandled Interaction is triggered

◆ waitIcon

CursorIconBase AC.CursorManager.waitIcon = new CursorIcon ()

The cursor while the game is running a gameplay-blocking cutscene

◆ walkIcon

CursorIconBase AC.CursorManager.walkIcon = new CursorIcon ()

The cursor when in "walk mode", if allowWalkCursor = True

◆ walkPrefix

HotspotPrefix AC.CursorManager.walkPrefix = new HotspotPrefix ("Walk to")

The prefix to add to the Hotspot label when in "walk mode", if addWalkPrefix = True