示例#1
0
 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)));
     }
 }
示例#2
0
 string GetSourceString(InputControlDescriptor source)
 {
     return(string.Format("{0} {1}", InputDeviceUtility.GetDeviceName(source), InputDeviceUtility.GetDeviceControlName(source)));
 }