Api Sandbox Engine BindCollection
class

BindCollection

public class BindCollection

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.

Constructors

BindCollection(String name)

Creates a collection and tries to load it from disk.

Properties

Name Type Description
Base BindCollection The base collection. Game binds have this set to the common binds.
CollectionName String Will be either "common" or the ident of the current game.
ConfigPath String The location of the config file to load from in EngineFileSystem.Config

Methods

ActionBind GetBind(String actionName, Boolean create = True)

Get the bind, create if it doesn't exist

ActionBind Set(String actionName, Int32 slot, String buttonName)

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

String Get(String actionName, Int32 slot)

Get the bind value at this slot

Void SaveToDisk()

Save the collection to disk

Fields

Name Type Description
Actions CaseInsensitiveDictionary<ActionBind> The actual collection of binds.
Assembly: Sandbox.Engine Namespace: Sandbox.Engine Full Name: Sandbox.Engine.BindCollection