/// <summary> /// Get the corresponding <see cref="DPadItem"/> given a <see cref="DPadValue"/>. /// </summary> /// <param name="value">Value</param> /// <returns>Item</returns> public static DPadItem From(DPadValue value) { var all = All(); foreach (var item in all) { if (item.Value == value) { return(item); } } return(null); }
private void HandleDPad(byte[] data) { DPadValue dpad = (DPadValue)data[12]; if (m_DPadState != dpad) { if (DPadStateChanged != null) { DPadStateChanged(m_GuiTranslater.TranslateDPad((byte)dpad)); } m_DPadState = dpad; } }
private void HandleDPad(byte[] data) { DPadValue dpad = (DPadValue)data[12]; if (m_DPadState != dpad) { if (DPadStateChanged != null) DPadStateChanged(m_GuiTranslater.TranslateDPad((byte)dpad)); m_DPadState = dpad; } }
public DPad(DPadValue up, DPadValue right, DPadValue down, DPadValue left) { Values = new DPadValue[] { up, right, down, left }; }
public DPadItem(DPadValue value, DPadCategory category, string name) { this.Value = value; this.Category = category; this.Name = name; }