Table of Contents

Class Lock

Namespace
UILib.Patches
Assembly
UILib.dll

A class used for controlling certain aspects of the game. Such as pausing, freeing the cursor, and preventing certain navigation interactions.

public class Lock
Inheritance
Lock
Inherited Members

Constructors

Lock(LockMode)

Initializes a lock, registering itself with the LockHandler.

The default mode is to pause the game and free the cursor.

public Lock(LockMode mode = LockMode.Default)

Parameters

mode LockMode

The mode this lock should be in

Properties

mode

The current mode this lock is in.

public LockMode mode { get; }

Property Value

LockMode

Methods

AddMode(LockMode)

Adds a mode to this lock.

This retains the current mode, but applies the provided mode as an extra mode on top.

public void AddMode(LockMode mode)

Parameters

mode LockMode

The mode to add

Close()

Closes this lock, unregistering it from the LockHandler.

This must be called, it's the only way for locks to be unregistered.

public void Close()

RemoveMode(LockMode)

Removes a mode from this lock.

This retains the current mode, but removes the provided mode from it.

public void RemoveMode(LockMode mode)

Parameters

mode LockMode

The mode to remove

SetMode(LockMode)

Sets the mode this lock is in.

public void SetMode(LockMode mode)

Parameters

mode LockMode

The mode to use