Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
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...
 

Public Attributes

CursorRendering cursorRendering = CursorRendering.Software
 
CursorDisplay cursorDisplay = CursorDisplay.Always
 
bool allowMainCursor = false
 
bool lockSystemCursor = true
 
bool keepCursorWithinScreen = true
 
bool allowWalkCursor = false
 
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 ()
 
InventoryHandling inventoryHandling = InventoryHandling.ChangeCursor
 
HotspotPrefix hotspotPrefix1 = new HotspotPrefix ("Use")
 
HotspotPrefix hotspotPrefix2 = new HotspotPrefix ("on")
 
HotspotPrefix hotspotPrefix3 = new HotspotPrefix ("Give")
 
HotspotPrefix hotspotPrefix4 = new HotspotPrefix ("to")
 
List< CursorIconcursorIcons = new List<CursorIcon>()
 
List< ActionListAssetunhandledCursorInteractions = new List<ActionListAsset>()
 
bool passUnhandledHotspotAsParameter
 
LookUseCursorAction lookUseCursorAction = LookUseCursorAction.DisplayBothSideBySide
 
int lookCursor_ID = 0
 
bool forceCursorInEditor
 

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"

◆ 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"

◆ 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

◆ cursorRendering

CursorRendering AC.CursorManager.cursorRendering = CursorRendering.Software

The rendering method of all cursors (Software, Hardware)

◆ cycleCursors

bool AC.CursorManager.cycleCursors = false

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

◆ 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"

◆ 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

◆ 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

◆ 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