void DrawButtonAxisSourceSummary(Rect rect, ButtonAxisSource source) { if ((Type)(source.negative.deviceType) == (Type)(source.positive.deviceType)) { EditorGUI.LabelField(rect, string.Format("{0} {1} & {2}", InputDeviceUtility.GetDeviceName(source.negative), InputDeviceUtility.GetDeviceControlName(source.negative), InputDeviceUtility.GetDeviceControlName(source.positive) ) ); } else { EditorGUI.LabelField(rect, string.Format("{0} & {1}", GetSourceString(source.negative), GetSourceString(source.positive))); } }
string GetSourceString(InputControlDescriptor source) { return(string.Format("{0} {1}", InputDeviceUtility.GetDeviceName(source), InputDeviceUtility.GetDeviceControlName(source))); }