API ReferenceSandbox.Engine

BindCollectionclass

A collection of action binds. BindCollection - Action: attack1 - Slot0: mouse1 - Action: selectall - Slot0: ctrl + a The bind collection can be saved and loaded from disk via the BindSaveConfig class. The bind collection can have a base collection which it will fall back to if it contains the same binds. This allows us to have a "common" collection which can be shared between all games, but can also let the games + users to override those binds if they choose.

objectBindCollection
Namespace
Sandbox.Engine
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Engine.BindCollection

Constructors1

Showing 1 constructors

public BindCollection(string name)PUBLICCONSTRUCTOR

Creates a collection and tries to load it from disk.

ParameterTypeDescription
namestring

Methods4

Showing 4 methods

public string Get(string actionName, int slot)PUBLIC

Get the bind value at this slot

ParameterTypeDescription
actionNamestring
slotint
Returns:string

public Sandbox.Engine.BindCollection.ActionBind GetBind(string actionName, bool create = True)PUBLIC

Get the bind, create if it doesn't exist

ParameterTypeDescription
actionNamestring
create = Truebool
Returns:ActionBind

public void SaveToDisk()PUBLIC

Save the collection to disk

Returns:void

public Sandbox.Engine.BindCollection.ActionBind Set(string actionName, int slot, string buttonName)PUBLIC

Set the bind value for this action. This will overwrite what's in this slot.

ParameterTypeDescription
actionNamestring
slotint
buttonNamestring
Returns:ActionBind

Properties3

Showing 3 properties

public string Sandbox.Engine.BindCollection.CollectionName { get; set; }PUBLICGETSET

Will be either "common" or the ident of the current game.

Returns:string

public string Sandbox.Engine.BindCollection.ConfigPath { get; set; }PUBLICGETSET

The location of the config file to load from in EngineFileSystem.Config

Returns:string

On this page