Example #1
0
 private void DrawInstanceLabels()
 {
     foreach (FMOD_Listener.EventInfo current in this.eventInfoList)
     {
         if (current.is3D)
         {
             foreach (FMOD_Listener.EventInstanceInfo current2 in current.instances)
             {
                 Vector3 position = current2.attributes3D.position.toUnityVector();
                 Vector3 vector   = base.GetComponent <Camera>().WorldToScreenPoint(position);
                 if (vector.z > 0f)
                 {
                     Vector2 vector2    = FMOD_Listener.InstanceLabelStyle.CalcSize(new GUIContent(current.path));
                     Rect    screenRect = new Rect(vector.x, (float)base.GetComponent <Camera>().pixelHeight - vector.y - vector2.y, vector2.x, vector2.y * (float)(current2.ParameterCount + 2));
                     GUILayout.BeginArea(screenRect);
                     FMOD_Listener.ValueBox(current.path, current2.normalizedPosition);
                     FMOD_Listener.ValueBox(string.Format("distance {0:G3}", current2.distance), current2.normalizedDistance);
                     if (current2.parameters != null)
                     {
                         foreach (FMOD_Listener.ParameterInfo current3 in current2.parameters)
                         {
                             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                             GUILayout.Label(current3.name, FMOD_Listener.InstanceLabelStyle, new GUILayoutOption[]
                             {
                                 GUILayout.ExpandWidth(false)
                             });
                             FMOD_Listener.ValueBox(current3.value.ToString("G3"), current3.normalizedValue);
                             GUILayout.EndHorizontal();
                         }
                     }
                     GUILayout.EndArea();
                 }
             }
         }
     }
 }
Example #2
0
 private static void ValueBox(string label, float progress)
 {
     FMOD_Listener.ValueBox(label, progress, FMOD_Listener.InstanceLabelStyle, FMOD_Listener.ProgressValueStyle);
 }