Table of Contents

Struct ControlHandle

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

A unified handle for referencing UI controls.

Abstracts the differences between VRage.Input.MyKeys (Keyboard), RichHudControls (Mouse/Custom), and VRage.Input.MyJoystickButtonsEnum (Gamepad) by wrapping them in a unique integer ID.

public struct ControlHandle

Constructors

ControlHandle(IControl)

public ControlHandle(IControl con)

Parameters

con IControl

ControlHandle(RichHudControls)

public ControlHandle(RichHudControls id)

Parameters

id RichHudControls

ControlHandle(int)

public ControlHandle(int id)

Parameters

id int

ControlHandle(string)

Creates a handle from a string name (looks up ID via BindManager).

public ControlHandle(string controlName)

Parameters

controlName string

ControlHandle(MyJoystickButtonsEnum)

public ControlHandle(MyJoystickButtonsEnum id)

Parameters

id MyJoystickButtonsEnum

ControlHandle(MyKeys)

public ControlHandle(MyKeys id)

Parameters

id MyKeys

Fields

GPKeysStart

The integer index offset where gamepad keys begin.

public const int GPKeysStart = 289

Field Value

int

id

The unique internal integer ID for this control.

public readonly int id

Field Value

int

Properties

Control

Retrieves the interface to the underlying IControl object via the BindManager.

public IControl Control { get; }

Property Value

IControl

ControlEnum

Returns the RichHudControls enum corresponding to this handle.

public RichHudControls ControlEnum { get; }

Property Value

RichHudControls

Methods

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

explicit operator ControlHandle(int)

public static explicit operator ControlHandle(int con)

Parameters

con int

Returns

ControlHandle

implicit operator RichHudControls(ControlHandle)

public static implicit operator RichHudControls(ControlHandle handle)

Parameters

handle ControlHandle

Returns

RichHudControls

implicit operator int(ControlHandle)

public static implicit operator int(ControlHandle handle)

Parameters

handle ControlHandle

Returns

int

implicit operator MyJoystickButtonsEnum(ControlHandle)

public static implicit operator MyJoystickButtonsEnum(ControlHandle handle)

Parameters

handle ControlHandle

Returns

MyJoystickButtonsEnum

implicit operator MyKeys(ControlHandle)

Implicit conversion to MyKeys. Throws exception if the handle does not represent a valid MyKey.

public static implicit operator MyKeys(ControlHandle handle)

Parameters

handle ControlHandle

Returns

MyKeys

implicit operator ControlHandle(RichHudControls)

public static implicit operator ControlHandle(RichHudControls id)

Parameters

id RichHudControls

Returns

ControlHandle

implicit operator ControlHandle(string)

public static implicit operator ControlHandle(string controlName)

Parameters

controlName string

Returns

ControlHandle

implicit operator ControlHandle(MyJoystickButtonsEnum)

public static implicit operator ControlHandle(MyJoystickButtonsEnum id)

Parameters

id MyJoystickButtonsEnum

Returns

ControlHandle

implicit operator ControlHandle(MyKeys)

public static implicit operator ControlHandle(MyKeys id)

Parameters

id MyKeys

Returns

ControlHandle