KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Attributes | Properties | List of all members
InputLockManager Class Reference

This class lets you lock the player out of certain controls. It's probably what KSP uses internally to lock controls during time warp, or when out of electric charge. More...

Public Member Functions

static void ClearControlLocks ()
 
static ControlTypes GetControlLock (string lockID)
 
static bool IsLocked (ControlTypes controlType)
 
static bool IsLocked (ControlTypes controlType, ControlTypes refMask)
 
static bool IsUnlocked (ControlTypes controlType)
 
static bool IsUnlocked (ControlTypes controlType, ControlTypes refMask)
 
static string PrintLockStack ()
 
static void RemoveControlLock (string lockID)
 Unlock a set of controls that were earlier locked with SetControlLock. More...
 
static ControlTypes SetControlLock (string lockID)
 
static ControlTypes SetControlLock (ControlTypes locks, string lockID)
 Locks a set of controls. More...
 

Static Public Attributes

static ulong lockMask
 
static Dictionary< string, ulong > lockStack
 The set of locks currently in place? More...
 

Properties

static ulong LockMask [get]
 If More...
 

Detailed Description

This class lets you lock the player out of certain controls. It's probably what KSP uses internally to lock controls during time warp, or when out of electric charge.

You can view the current set of locks in-game with the Alt-F12 debug menu.

Member Function Documentation

static void InputLockManager.ClearControlLocks ( )
static ControlTypes InputLockManager.GetControlLock ( string  lockID)
static bool InputLockManager.IsLocked ( ControlTypes  controlType)
static bool InputLockManager.IsLocked ( ControlTypes  controlType,
ControlTypes  refMask 
)
static bool InputLockManager.IsUnlocked ( ControlTypes  controlType)
static bool InputLockManager.IsUnlocked ( ControlTypes  controlType,
ControlTypes  refMask 
)
static string InputLockManager.PrintLockStack ( )
static void InputLockManager.RemoveControlLock ( string  lockID)

Unlock a set of controls that were earlier locked with SetControlLock.

Parameters
lockIDThe string ID passed to SetControlLock.
static ControlTypes InputLockManager.SetControlLock ( string  lockID)
static ControlTypes InputLockManager.SetControlLock ( ControlTypes  locks,
string  lockID 
)

Locks a set of controls.

Parameters
locksWhich controls to lock. You can OR several ControlTypes together to lock several types of controls at once.
lockIDA unique string ID that you will pass to RemoveControlLock to unlock these controls.
Returns
?

Member Data Documentation

ulong InputLockManager.lockMask
static
Dictionary<string, ulong> InputLockManager.lockStack
static

The set of locks currently in place?

Property Documentation

ulong InputLockManager.LockMask
get

If

ControlTypes.X & LockMask != 0 then ControlTypes.X is locked?


The documentation for this class was generated from the following file: