C# Class OpenStory.Common.Game.KeyLayout

Represents a collection of key mappings for in-game actions.
Show file Open project: shoftee/OpenStory Class Usage Examples

Public Methods

Method Description
GetKeyBinding ( byte keyId ) : KeyBinding

Gets the key binding for a key.

KeyLayout ( ICollection bindings ) : System

Initializes a new instance of the KeyLayout class.

SetKeyBinding ( byte keyId, byte type, int action ) : void

Sets the key binding for a key.

Private Methods

Method Description
KeyLayout ( ) : System
ThrowIfInvalidId ( byte keyId ) : void

Method Details

GetKeyBinding() public method

Gets the key binding for a key.
/// Thrown if is greater than . ///
public GetKeyBinding ( byte keyId ) : KeyBinding
keyId byte The key to query the key binding of.
return KeyBinding

KeyLayout() public method

Initializes a new instance of the KeyLayout class.
/// Thrown if is . /// /// Thrown if does not have exactly elements. ///
public KeyLayout ( ICollection bindings ) : System
bindings ICollection The bindings to use for this instance.
return System

SetKeyBinding() public method

Sets the key binding for a key.
/// Thrown if is greater than . ///
public SetKeyBinding ( byte keyId, byte type, int action ) : void
keyId byte The key to set the key binding of.
type byte The new action type for the key binding.
action int The new action for the key binding.
return void